Repository navigation
CI: tag and cut a GitHub Release on each npm publish - #32
Merged
Merged
Conversation
After npm publish, tag the bump commit as vX.Y.Z, push the tag, and create a matching GitHub Release with auto-generated notes. Pushing a tag does not match the branches:[main] trigger, so no CI loop. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QN86rvEYiZrnhp1vAN2YPZ
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.
What changed
publish.ymlgets a final step. Afternpm publishsucceeds, it tags the version-bump commit asvX.Y.Z, pushes the tag, and creates a matching GitHub Release with auto-generated notes (gh release create --generate-notes). The repo has no tags or releases yet, so the first release's notes cover all history; later ones cover the PRs merged since the previous tag.Why
Every merge to
mainpublishes to npm, but nothing on GitHub marks which commit became which version. Release notes also give users of the package a changelog.Notes
permissions: contents: write, which the tag push and release need.GITHUB_TOKENdoesn't trigger workflows, andpublish.ymlonly runs on pushes tomain, so this can't loop.npm publish, so a failed publish creates no tag.Verification
Merging this PR is itself the test: it publishes 0.2.16 and should create tag
v0.2.16and its GitHub Release.