From 76668b2cd6397296917a2a74d5705a6cec4695bd Mon Sep 17 00:00:00 2001 From: Dragan Filipovic Date: Thu, 2 Apr 2026 22:59:30 +0200 Subject: [PATCH] chore: add workflow to auto-update major version tag on release Adds update-major-tag.yml that triggers on any published release and force-updates the major version tag (e.g., v6) to point to the latest release (e.g., v6.0.1). Enables users to pin to @v6 instead of full version numbers. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/update-major-tag.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/update-major-tag.yml diff --git a/.github/workflows/update-major-tag.yml b/.github/workflows/update-major-tag.yml new file mode 100644 index 0000000..ee73f7d --- /dev/null +++ b/.github/workflows/update-major-tag.yml @@ -0,0 +1,23 @@ +name: Update major version tag + +on: + release: + types: [published] + +jobs: + update-tag: + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - uses: actions/checkout@v6 + with: + fetch-depth: 0 + - name: Update major version tag + run: | + VERSION="${{ github.event.release.tag_name }}" + MAJOR="v$(echo "$VERSION" | sed 's/^v//' | cut -d. -f1)" + echo "Updating $MAJOR tag to point to $VERSION" + git tag -f "$MAJOR" "$VERSION" + git push -f origin "$MAJOR"