ci(release): use the tag annotation as the release description

The release was created with no body; now the annotated tag's message
is published as the release notes (lightweight tags keep an empty body).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-07 14:29:01 +01:00
parent d023df1b4a
commit dfb434aec3
+6 -2
View File
@@ -34,12 +34,16 @@ jobs:
TAG: ${{ github.ref_name }}
run: |
set -euo pipefail
# Create the release for the pushed tag.
# Create the release for the pushed tag. The annotated tag's message
# becomes the release description (empty for lightweight tags).
body=$(git tag -l --format='%(contents)' "${TAG}")
payload=$(jq -n --arg tag "${TAG}" --arg body "${body}" \
'{tag_name: $tag, name: $tag, body: $body}')
id=$(curl -fsSL -X POST \
-H "Authorization: token ${TOKEN}" \
-H "Content-Type: application/json" \
"${SERVER}/api/v1/repos/${REPO}/releases" \
-d "{\"tag_name\":\"${TAG}\",\"name\":\"${TAG}\"}" | jq -r '.id')
-d "${payload}" | jq -r '.id')
echo "release id: ${id}"
# Upload every built asset (binaries + checksums.txt).
for f in dist/*; do