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