Skip to content

Commit 8c4f6d9

Browse files
authored
ci: fix formatting for checksum in release notes (#2060)
fix formatting for the checksum in the release notes
1 parent 4de7bd6 commit 8c4f6d9

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

.github/workflows/release.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,11 @@ jobs:
111111
local hash_cmd=$2
112112
echo "### ${hash_type}" >> checksums.txt
113113
for file in auth-v$RELEASE_VERSION*.tar.gz; do
114-
echo "\`$file\`:\n\`\`\`" >> checksums.txt
114+
echo "\`$file\`:" >> checksums.txt
115+
echo "\`\`\`" >> checksums.txt
115116
$hash_cmd "$file" | awk '{print $1}' >> checksums.txt
116-
echo "\`\`\`\n" >> checksums.txt
117+
echo "\`\`\`" >> checksums.txt
118+
echo "" >> checksums.txt
117119
done
118120
}
119121
@@ -132,11 +134,18 @@ jobs:
132134
PR_NUMBER='${{ steps.release.outputs.pr && fromJSON(steps.release.outputs.pr).number }}'
133135
CHECKSUM_CONTENT=$(cat checksums.txt)
134136
137+
RELEASE_NOTES=$(cat <<EOF
138+
This is a release candidate. See release-please PR #$PR_NUMBER for context.
139+
140+
$CHECKSUM_CONTENT
141+
EOF
142+
)
143+
135144
GH_TOKEN='${{ github.token }}' gh release \
136145
create $RELEASE_NAME \
137146
--title "v$RELEASE_VERSION" \
138147
--prerelease \
139-
-n "This is a release candidate. See release-please PR #$PR_NUMBER for context.\n\n$CHECKSUM_CONTENT"
148+
-n "$RELEASE_NOTES"
140149

141150
GH_TOKEN='${{ github.token }}' gh pr comment "$PR_NUMBER" \
142151
-b "Release candidate [v$RELEASE_VERSION](https://github.com/supabase/gotrue/releases/tag/$RELEASE_NAME) published."
@@ -164,7 +173,12 @@ jobs:
164173
# Append checksums to existing release notes
165174
EXISTING_NOTES=$(GH_TOKEN='${{ github.token }}' gh release view $RELEASE_NAME --json body -q .body)
166175
CHECKSUM_CONTENT=$(cat checksums.txt)
167-
FULL_NOTES="${EXISTING_NOTES}\n\n${CHECKSUM_CONTENT}"
176+
FULL_NOTES=$(cat <<EOF
177+
$EXISTING_NOTES
178+
179+
$CHECKSUM_CONTENT
180+
EOF
181+
)
168182
GH_TOKEN='${{ github.token }}' gh release edit $RELEASE_NAME -n "$FULL_NOTES"
169183

170184
GH_TOKEN='${{ github.token }}' gh release upload $RELEASE_NAME ./auth-v$RELEASE_VERSION-x86.tar.gz ./auth-v$RELEASE_VERSION-arm64.tar.gz ./auth-v$RELEASE_VERSION.supafast-arm64.tar.gz

0 commit comments

Comments
 (0)