From ffdbb6131e00eb45c279109241cf55ff0ecc4d63 Mon Sep 17 00:00:00 2001 From: Steve Cliff Date: Tue, 7 Jul 2026 14:40:53 +0100 Subject: [PATCH] ci(release): re-fetch the tag object before reading its annotation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .gitea/workflows/release.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index c28c669..0955fd6 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -36,6 +36,9 @@ jobs: set -euo pipefail # Create the release for the pushed tag. The annotated tag's message # 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}") payload=$(jq -n --arg tag "${TAG}" --arg body "${body}" \ '{tag_name: $tag, name: $tag, body: $body}')