ci: cut GitHub Release in bump flow, not on every tag push#83
Merged
Conversation
Move GitHub Release creation from release.yml to bump.yml so the automatic (workflow_dispatch) flow gets a release, while manual UI-created releases keep their hand-written notes. - bump.yml: create release after tag push; capture tag from pnpm version output; add contents:write permission - release.yml: drop release step (was clobbering UI-authored notes since it ran on every v* tag push)
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
We have two release paths that both end in a
v*tag push (which firesrelease.yml→ npm publish):workflow_dispatch→bump.ymlbumps the version and pushes a tag.The previous
release.ymlranaction-gh-releaseon every tag push. For the manual flow the Release already exists (with hand-written notes), so it clobbered those notes with auto-generated ones. The automatic flow, meanwhile, produced no Release at all once that step was removed.What
bump.yml— create the GitHub Release after pushing the tag (only the automatic flow needs one). Tag name is captured frompnpm versionoutput. Addedpermissions: contents: writesoGITHUB_TOKENcan create the release. Bump command moved to a block scalar to avoid the:-in-scalar YAML parse error.release.yml— dropped the release step; it stays npm-publish-only for both flows.Result
bump.ymlcuts the Release.release.yml→ npm publish for both.