Skip to content

ci(release): harden release push order + bump checkout to v5#5

Merged
xergioalex merged 1 commit into
mainfrom
ci/harden-release-push-order
Jun 1, 2026
Merged

ci(release): harden release push order + bump checkout to v5#5
xergioalex merged 1 commit into
mainfrom
ci/harden-release-push-order

Conversation

@xergioalex
Copy link
Copy Markdown
Member

Summary

Follow-up hardening to the auto-release job, on top of the quoting fix in #4. Triggers a clean 2.1.0 release once merged (now that AUTOMATION_GITHUB_TOKEN is configured).

1. Push main before tagging

The previous step ran git push origin main --follow-tags, which pushes the branch and the tag as independent refs. When the protected main push was rejected, the tag had already been pushed — leaving a dangling vX.Y.Z tag pointing at a commit not reachable from main. That tag then blocks every future release (tag already exists). This is exactly what happened with v2.1.0 (since cleaned up).

Now the job pushes HEAD:main first and only creates + pushes the tag after main accepts the release commit. A rejection now leaves no tag behind.

2. actions/checkout@v4 → @v5

Runs on Node 24 and clears the Node.js 20 actions are deprecated runner 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
  • Version-bump/changelog logic unchanged.

🤖 Generated with Claude Code

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>
@xergioalex xergioalex merged commit 29fa010 into main Jun 1, 2026
7 checks passed
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