From a86e2270187cbee619a14beadfc1f6a22fc4597c Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Tue, 21 Jul 2026 11:24:52 +0200 Subject: [PATCH] Fix major version tag not being updated on release The previous versioning workflow used Actions-R-Us/actions-tagger without an explicit permissions block. With GitHub's read-only default GITHUB_TOKEN it cannot push the major tag, so `v1` was never moved to v1.3.0. Replace it with the same script-based workflow used in wearerequired/lint-action: it declares `contents: write` and force-updates the `vMAJOR` tag to the released commit via git. --- .github/workflows/versioning.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/versioning.yml b/.github/workflows/versioning.yml index cec0952..90a9dcf 100644 --- a/.github/workflows/versioning.yml +++ b/.github/workflows/versioning.yml @@ -4,13 +4,28 @@ on: release: types: [published, edited] +permissions: + contents: write + concurrency: group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: false + cancel-in-progress: true jobs: update-major-tag: runs-on: ubuntu-latest steps: - - uses: Actions-R-Us/actions-tagger@v2 + - uses: actions/checkout@v7 + + - name: Update major version tag + env: + TAG: ${{ github.event.release.tag_name }} + run: | + MAJOR="${TAG%%.*}" + if [[ ! "$MAJOR" =~ ^v[0-9]+$ ]]; then + echo "Skipping tag '$TAG': no major version prefix found." + exit 0 + fi + git tag --force "$MAJOR" "$GITHUB_SHA" + git push --force origin "$MAJOR"