File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments