From dfb434aec3757ef7a0d90c00cdbf1da39e3b2c05 Mon Sep 17 00:00:00 2001 From: Steve Cliff Date: Tue, 7 Jul 2026 14:29:01 +0100 Subject: [PATCH] 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 --- .gitea/workflows/release.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 36f478e..c28c669 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -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