ci(release): re-fetch the tag object before reading its annotation
actions/checkout recreates the pushed tag ref from the commit SHA, which discards the annotation — v0.7.0's release body ended up being the commit message. Fetch the real tag object before formatting it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -36,6 +36,9 @@ jobs:
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
# Create the release for the pushed tag. The annotated tag's message
|
# Create the release for the pushed tag. The annotated tag's message
|
||||||
# becomes the release description (empty for lightweight tags).
|
# becomes the release description (empty for lightweight tags).
|
||||||
|
# Re-fetch the real tag object first: checkout creates the tag ref
|
||||||
|
# from the commit SHA, which silently discards the annotation.
|
||||||
|
git fetch --force --no-tags origin "refs/tags/${TAG}:refs/tags/${TAG}"
|
||||||
body=$(git tag -l --format='%(contents)' "${TAG}")
|
body=$(git tag -l --format='%(contents)' "${TAG}")
|
||||||
payload=$(jq -n --arg tag "${TAG}" --arg body "${body}" \
|
payload=$(jq -n --arg tag "${TAG}" --arg body "${body}" \
|
||||||
'{tag_name: $tag, name: $tag, body: $body}')
|
'{tag_name: $tag, name: $tag, body: $body}')
|
||||||
|
|||||||
Reference in New Issue
Block a user