Add one-click release workflow to prevent tag/version drift#39
Merged
Conversation
Releases were being tagged by hand, decoupled from the package.json bump, so tags could (and did) disagree with the published version — the Publish guard rejected v0.3.3 because package.json still said 0.2.11. Add a dispatch-driven Release workflow that runs npm version to bump, commit, tag, publish, and cut the GitHub release from one source of truth, making the tag/version mismatch structurally impossible. Document the flow (and the manual fallback rules) in RELEASING.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Clear and robust one-click release workflow preventing version drift. 🎯 Quality: 99% Elite · 📦 Size: Medium 📈 This month: Your 215th PR — above team average · Averaging Excellent |
Contributor
Author
|
/review |
devlob
approved these changes
Jul 13, 2026
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.
Why
The
Publishworkflow rejectedv0.3.3because the tag (0.3.3) didn't matchpackage.json(0.2.11) — the second time this has happened. Root cause: tags are created by hand, decoupled from thepackage.jsonbump, so they can drift from the version that actually gets published.What
.github/workflows/release.yml— a dispatch-driven Release workflow (Actions → Release → Run workflow). Pickpatch/minor/majoror type an explicit version; it runsnpm versionto bump + commit + tag, then pushes, publishes to npm (with provenance), and cuts the GitHub release — all from one number. Because the tag is derived fromnpm version, it can never disagree withpackage.json.RELEASING.md— documents the one-click path and the manual fallback rules.The existing
publish.ymlis untouched: its guard stays as a safety net for hand-made releases, and it won't double-publish (releases created byrelease.ymluseGITHUB_TOKEN, which doesn't re-trigger therelease: publishedevent).Note
This does not itself fix the in-flight
v0.3.3failure —mainhas diverged from thepulse-protect-node-wafbranch that shipped0.3.0–0.3.2, so the correct source/version for0.3.3needs a human call before re-cutting.🤖 Generated with Claude Code