Skip to content

Merge pull request #25 from virtualcell/fix/execute-after-subcommand #1

Merge pull request #25 from virtualcell/fix/execute-after-subcommand

Merge pull request #25 from virtualcell/fix/execute-after-subcommand #1

Workflow file for this run

name: Move major tag
# Keep the floating vN major tag pointing at the latest vN.M.P release, so repos
# consuming the reusable workflows via `uses: …@vN` receive minor/patch updates
# automatically. Without this the force-move is manual, and a single missed move
# silently freezes every @vN consumer on old code while they believe they're
# current. Mirrors how actions/checkout maintains its v4 tag.
on:
push:
tags: ['v*.*.*']
permissions:
contents: write
# Tags are moved sequentially; never race two release pushes.
concurrency:
group: move-major-tag
cancel-in-progress: false
jobs:
move:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Move major tag to this release
run: |
tag="$GITHUB_REF_NAME"
# Only stable vMAJOR.MINOR.PATCH releases move the major pointer; skip
# prereleases (e.g. v1.2.3-rc1) so @vN never lands on a prerelease.
if [[ ! "$tag" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "::notice::$tag is not a stable vX.Y.Z tag — leaving major tag unchanged"
exit 0
fi
major="${tag%%.*}" # v1.7.0 -> v1
echo "Moving $major -> $tag ($GITHUB_SHA)"
git tag -f "$major" "$GITHUB_SHA"
git push -f origin "refs/tags/$major"