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:
@@ -34,12 +34,16 @@ jobs:
|
|||||||
TAG: ${{ github.ref_name }}
|
TAG: ${{ github.ref_name }}
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
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 \
|
id=$(curl -fsSL -X POST \
|
||||||
-H "Authorization: token ${TOKEN}" \
|
-H "Authorization: token ${TOKEN}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
"${SERVER}/api/v1/repos/${REPO}/releases" \
|
"${SERVER}/api/v1/repos/${REPO}/releases" \
|
||||||
-d "{\"tag_name\":\"${TAG}\",\"name\":\"${TAG}\"}" | jq -r '.id')
|
-d "${payload}" | jq -r '.id')
|
||||||
echo "release id: ${id}"
|
echo "release id: ${id}"
|
||||||
# Upload every built asset (binaries + checksums.txt).
|
# Upload every built asset (binaries + checksums.txt).
|
||||||
for f in dist/*; do
|
for f in dist/*; do
|
||||||
|
|||||||
Reference in New Issue
Block a user