Skip to content

Commit d635091

Browse files
committed
Please
1 parent 72e9981 commit d635091

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.github/workflows/build-and-release.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,15 @@ jobs:
6969
run: |
7070
TAG=${GITHUB_REF##*/}
7171
echo "tag=$TAG" >> $GITHUB_OUTPUT
72-
# Try to read annotated tag contents
73-
BODY=$(git for-each-ref --format='%(contents)' refs/tags/$TAG 2>/dev/null || true)
72+
# Extract the annotated tag message using git show
73+
BODY=$(git show -s --format=%b refs/tags/$TAG 2>/dev/null || echo "")
74+
# If empty, try the subject line
7475
if [ -z "$BODY" ]; then
75-
BODY=$(git tag -l --format='%(contents)' "$TAG" 2>/dev/null || true)
76+
BODY=$(git show -s --format=%s refs/tags/$TAG 2>/dev/null || echo "")
7677
fi
77-
# Fallback to commit message if no tag message
78+
# Fallback: get full message (subject + body)
7879
if [ -z "$BODY" ]; then
79-
BODY=$(git log -1 --pretty=%B)
80+
BODY=$(git show -s --format=%B refs/tags/$TAG 2>/dev/null || echo "")
8081
fi
8182
echo "body<<EOF" >> $GITHUB_OUTPUT
8283
echo "$BODY" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)