Repository navigation
Use the annotated tag's message as the release notes in CI - #32
Merged
Merged
Conversation
On a tag push, actions/checkout fetches every tag and then runs `git fetch --no-tags origin +<sha>:refs/tags/<tag>`, which re-points the pushed tag at its commit. The annotated tag object, and its message, are gone from the runner, so publish-claude.cjs found a lightweight tag and wrote the generic release line. v0.4.21 and v0.4.22 were published that way. A step after the tag check fetches the tag object again and logs its type; publish-claude.cjs then reads the message as before. A lightweight tag still gets the generic line. Co-Authored-By: Claude Opus 5.5 <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.
Why
Releases are meant to take their notes from the annotated tag's message (README, Development). On a tag push, though,
actions/checkout@v4re-points the pushed tag at its commit after fetching all tags. From the v0.4.22 run:That leaves a lightweight tag on the runner, so
publish-claude.cjsfound no message and published the generic line. v0.4.21 and v0.4.22 both went out that way.Change
After the existing tag check, a new step fetches the tag object again and logs its type:
git fetch --force --no-tags origin "refs/tags/${GITHUB_REF_NAME}:refs/tags/${GITHUB_REF_NAME}"publish-claude.cjsis unchanged: it reads the message as before, and a lightweight tag still gets the generic line. The step runs only on tag pushes. A manual dispatch is unaffected, because its full fetch keeps annotated tags.Verification
In a fresh clone I ran checkout's exact fetch commands against this repository:
v0.4.22is atag.commit.tagagain, and the publish script'sfor-each-refreads the message. HEAD stays ata6adae7.The workflow parses, with the new step between the tag check and
release:check. It will first run for real on the next release tag.Already published
I edited the v0.4.21 and v0.4.22 releases on GitHub to their tag messages, keeping the revision and checksum lines. Their assets and the catalog are unchanged.
🤖 Generated with Claude Code