Skip to content

Commit 857dd3a

Browse files
committed
Adjust release notes
1 parent bc8136f commit 857dd3a

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

.github/workflows/release-from-changelog.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,22 @@ jobs:
4848
id: extract_notes
4949
run: |
5050
echo "Extracting release notes for version: $version"
51-
echo "${{ fromJson(steps.parse-changelog.outputs.result)[0].contents }}" > RELEASE_NOTES.md
51+
52+
# Save the raw JSON to a file to avoid GitHub Actions template processing that strips backticks
53+
echo '${{ steps.parse-changelog.outputs.result }}' > /tmp/changelog_raw.json
54+
55+
CHANGELOG_CONTENTS=$(cat /tmp/changelog_raw.json | jq -r '.[0].contents // empty')
56+
echo "Changelog contents: (content length: ${#CHANGELOG_CONTENTS} characters)"
57+
58+
if [[ -z "$CHANGELOG_CONTENTS" ]]; then
59+
echo "🚨 No changelog contents found. Exiting."
60+
exit 1
61+
fi
62+
63+
# Save the extracted content to a file to preserve special characters
64+
echo "$CHANGELOG_CONTENTS" > RELEASE_NOTES.md
65+
66+
# echo "${{ fromJson(steps.parse-changelog.outputs.result)[0].contents }}" > RELEASE_NOTES.md
5267
# echo ""
5368
# sed -n '/^## '"$version"'/,/^## /p' CHANGELOG.md | sed '1d;$d' > RELEASE_NOTES.md
5469
# # Remove line wrapping.

0 commit comments

Comments
 (0)