Skip to content

Use the annotated tag's message as the release notes in CI - #32

Merged
MainSequenceDev merged 1 commit into
mainfrom
claude/release-tag-notes
Oct 26, 2026
Merged

MainSequenceDev merged 1 commit into
mainfrom
claude/release-tag-notes

Conversation

@MainSequenceDev

Copy link
Copy Markdown
Contributor

Why

Releases are meant to take their notes from the annotated tag's message (README, Development). On a tag push, though, actions/checkout@v4 re-points the pushed tag at its commit after fetching all tags. From the v0.4.22 run:

git fetch --prune --no-recurse-submodules origin +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/*
git fetch --no-tags --prune --no-recurse-submodules origin +a6adae79c48715e8a05edef701729ff084b52b07:refs/tags/v0.4.22

That leaves a lightweight tag on the runner, so publish-claude.cjs found 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.cjs is 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:

  • After the full fetch, v0.4.22 is a tag.
  • After checkout's re-point it is a commit.
  • After the new step it is a tag again, and the publish script's for-each-ref reads the message. HEAD stays at a6adae7.

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

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>
@MainSequenceDev
MainSequenceDev merged commit 825c465 into main Oct 26, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant