ci: set git identity for auto-versioning and normalize tags; update .gitignore

This commit is contained in:
CI
2025-11-29 23:48:33 +00:00
parent 4595fd4dd0
commit 7b4145606f
2 changed files with 11 additions and 2 deletions

View File

@@ -37,7 +37,17 @@ jobs:
- name: Create annotated tag and push
if: ${{ steps.semver.outputs.changed }}
run: |
git tag -a v${{ steps.semver.outputs.version }} -m "Release v${{ steps.semver.outputs.version }}"
# Ensure a committer identity is configured in the runner so git tag works
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions"
# Normalize the version: remove any leading 'v' so we don't end up with 'vvX.Y.Z'
RAW="${{ steps.semver.outputs.version }}"
VERSION_NO_V="${RAW#v}"
TAG="v${VERSION_NO_V}"
echo "Creating tag: ${TAG}"
git tag -a "${TAG}" -m "Release ${TAG}"
git push origin --tags
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

1
.gitignore vendored
View File

@@ -118,4 +118,3 @@ PROJECT_PLANNING.md
SECURITY_IMPLEMENTATION_PLAN.md
VERSIONING_IMPLEMENTATION.md
backend/internal/api/handlers/import_handler.go.bak
docker-compose.local.yml