Skip to content

Move the major tag automatically on release - #13

Open
scottf wants to merge 3 commits into
mainfrom
move-major-tag-on-release
Open

Move the major tag automatically on release#13
scottf wants to merge 3 commits into
mainfrom
move-major-tag-on-release

Conversation

@scottf

@scottf scottf commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Why

Callers reference this repo as @v2 — a moving tag. That only delivers fixes if someone repoints the tag at every release, and that step is manual.

It got missed. PR #12 (fix for auto-review skipping maintainer PRs) merged on July 20, but v2 stayed on 5b7104f, the commit that introduced the bug. nats-io/nats.java resolves @v2, so it kept running the broken gate — a brand new PR two days later (#1601) was still skipped. Nothing surfaced this; the run just showed skipped and the caller had no way to tell it was on a stale version.

I've since moved v2 to d24bb93 and cut v2.3.1, so that specific problem is fixed. This PR is so it can't happen again.

What

.github/workflows/move-major-tag.yml — pushing a vX.Y.Z tag force-moves vX to the same commit.

git tag v2.3.2 <sha>
git push origin v2.3.2      # -> v2 now points here too

Pre-release tags (v2.4.0-rc1) are skipped, so they don't move v2.

Needs contents: write to push the tag; that's scoped to this one job. README gains a short "Releasing" subsection under Versioning.

Note

Tags pushed by GITHUB_TOKEN don't trigger workflows, so there's no recursion risk here — and the trigger pattern requires two dots, which v2 doesn't have, so it wouldn't re-fire anyway.

Callers use @v2, which only delivers fixes if the tag is repointed at every
release. That was done by hand and got missed: v2 stayed on the pre-#12 commit
for two days after the fix merged, so consumers kept running the broken
auto-review gate with no signal anything was stale.

Pushing a vX.Y.Z tag now force-moves vX to the same commit. Pre-release tags
are ignored.
@scottf
scottf requested a review from Jarema July 22, 2026 17:36
scottf added 2 commits July 22, 2026 13:46
A filter that never matches would make this workflow silently do nothing --
the same quiet staleness it exists to prevent. [0-9]* needs only plain glob
semantics, and still requires a digit in each position.
The Releasing section covered the routine case but not a new major, leaving a
reader to assume they seed v3 themselves. Pushing v3.0.0 creates v3.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant