Repository navigation
ci: Bind GitHub release draft to tag via gh release create - #53
Merged
Merged
Conversation
Previously `softprops/action-gh-release@v2` was used without an explicit
`tag_name`, which made GitHub create the draft release with an
`untagged-<hash>` placeholder slug. The tag had to be manually re-selected
in the GitHub UI before publishing.
Switch to `gh release create "${{ github.ref_name }}"` so the draft is
bound to the actual pushed tag from the start, matching the pattern used
in `prettier-plugin-latte-tailwind`.
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
softprops/action-gh-release@v2withgh release create "${{ github.ref_name }}" --draft --target "${{ github.sha }}"inpublish.ymlWhy
Previously the draft release got created with an
untagged-<hash>placeholder slug instead of being bound to the actual pushed tag (e.g. URLreleases/tag/untagged-32cebe2eab...rather thanreleases/tag/3.3.3). The tag had to be manually re-selected in the GitHub UI before publishing.Switching to
gh release createwith explicittag_name(viagithub.ref_name) binds the draft to the real tag from the start. This matches the pattern inprettier-plugin-latte-tailwindand resolves a recurring problem across our release workflows.Test plan
releases/tag/<version>directly (nountagged-slug)dist/PdNaja.esm.jsanddist/PdNaja.esm.js.mapare still attached to the draft