ci(release): harden release push order + bump checkout to v5#5
Merged
Conversation
Two hardening changes to the auto-release job: 1. Push order. The step pushed the branch and tag together with `git push origin main --follow-tags`. git pushes each ref independently, so when the protected `main` push was rejected the tag had already been created on the remote — leaving a dangling `vX.Y.Z` tag pointing at a commit not reachable from main, which then blocks every future release (the tag "already exists"). Now we push `HEAD:main` first and only create+push the tag after main accepts the release commit, so a rejection leaves no tag behind. 2. Bump actions/checkout@v4 -> @v5 to run on Node 24 and clear the "Node.js 20 actions are deprecated" runner warning. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up hardening to the auto-release job, on top of the quoting fix in #4. Triggers a clean
2.1.0release once merged (now thatAUTOMATION_GITHUB_TOKENis configured).1. Push
mainbefore taggingThe previous step ran
git push origin main --follow-tags, which pushes the branch and the tag as independent refs. When the protectedmainpush was rejected, the tag had already been pushed — leaving a danglingvX.Y.Ztag pointing at a commit not reachable frommain. That tag then blocks every future release (tag already exists). This is exactly what happened withv2.1.0(since cleaned up).Now the job pushes
HEAD:mainfirst and only creates + pushes the tag after main accepts the release commit. A rejection now leaves no tag behind.2.
actions/checkout@v4 → @v5Runs on Node 24 and clears the
Node.js 20 actions are deprecatedrunner warning (Node 20 is force-removed from runners after June 16, 2026).Validation
python3 -c "import yaml; yaml.safe_load(open('.github/workflows/auto-release.yml'))"→ OK🤖 Generated with Claude Code