mirror of
https://github.com/Dasemu/umami-analytics-mcp.git
synced 2026-11-26 15:26:07 +00:00
Add root CLAUDE.md, docs/, LESSONS.md, .env.example, project hooks (.claude/settings.json) and CI workflows (lint/test + versioning), per the standard repo bootstrap. No lint/test tooling exists yet, so hooks and CI only run a py_compile sanity check; CI/versioning target the development/main branch convention even though development does not exist yet. Deployment stays on Nixpacks for now (flagged in LESSONS.md pending a decision on migrating to the standard LXC/VPS+systemd setup). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
64 lines
2.0 KiB
YAML
64 lines
2.0 KiB
YAML
name: Version
|
|
|
|
on:
|
|
push:
|
|
branches: [development, main]
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
bump:
|
|
if: github.actor != 'github-actions[bot]'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Configure git
|
|
run: |
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
|
|
- name: Bump version
|
|
run: |
|
|
set -euo pipefail
|
|
current=$(cat VERSION)
|
|
IFS=. read -r major minor patch <<< "$current"
|
|
|
|
if [ "${{ github.ref_name }}" = "development" ]; then
|
|
patch=$((patch + 1))
|
|
else
|
|
# main: PATCH+1 for a direct hotfix push, MINOR+1/PATCH=0 when every
|
|
# commit in this push came from development (an approved PR merge).
|
|
merge_base=$(git merge-base origin/development HEAD 2>/dev/null || echo "")
|
|
before="${{ github.event.before }}"
|
|
if [ -n "$merge_base" ] && [ -n "$before" ] && [ "$before" != "0000000000000000000000000000000000000000" ] \
|
|
&& git merge-base --is-ancestor "$before" origin/development 2>/dev/null; then
|
|
minor=$((minor + 1))
|
|
patch=0
|
|
else
|
|
patch=$((patch + 1))
|
|
fi
|
|
fi
|
|
|
|
new_version="$major.$minor.$patch"
|
|
echo "$new_version" > VERSION
|
|
git add VERSION
|
|
git commit -m "chore(release): v$new_version [skip ci]"
|
|
git tag "v$new_version"
|
|
|
|
- name: Push changes
|
|
run: git push origin HEAD:${{ github.ref_name }} --follow-tags
|
|
|
|
- name: Merge main back into development
|
|
if: github.ref_name == 'main'
|
|
run: |
|
|
set -euo pipefail
|
|
git fetch origin development
|
|
git checkout development
|
|
git merge --no-edit origin/main
|
|
git push origin development
|