ci: auto-release on package.json version bump#104
Merged
Conversation
Watches main for changes to package.json. When the version field
changes to a value with no existing tag, the workflow:
1. Tags v<x.y.z> at the merge commit (annotated with theme from
changelog/<x.y.z>.md first line).
2. Pushes the tag.
3. Creates a GitHub Release with body = the changelog file.
Refuses to release without a matching changelog/<x.y.z>.md file —
shipping notes-less releases is never useful, so fail loud.
Backstory: tagging stalled after v0.8.1; PRs continued to update
package.json + changelog/ but no releases were filed. v0.9.0–v0.11.7
were just backfilled by hand. This closes the loop so future
releases happen the same day they merge.
Co-Authored-By: Claude Opus 4.7 (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
Closes the gap between `package.json` version bumps and the GitHub Releases page.
Tagging stalled after v0.8.1 — PRs kept updating `package.json` + adding `changelog/<x.y.z>.md` shards, but no releases were ever filed. v0.9.0 through v0.11.7 were just backfilled by hand (11 tags + 11 releases). This workflow makes sure the next release happens the same day it merges.
How it works
On every push to `main` that touches `package.json` or `changelog/*.md`:
Test plan
Permissions
Adds `permissions: contents: write` (default is `read`) — required for the workflow to push tags and create releases via `GITHUB_TOKEN`.
🤖 Generated with Claude Code