Skip to content

Commit f53a39a

Browse files
Update sync-readme-changelog.yml
1 parent 3c070aa commit f53a39a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/sync-readme-changelog.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ jobs:
3939
--header 'x-readme-version: v5.5.1' \
4040
--data "$payload"
4141

42+
# Escape newlines for Slack payload
43+
release_body_escaped=$(echo -n "$release_body" | sed ':a;N;$!ba;s/\n/\\n/g')
44+
echo "release_body_escaped=$release_body_escaped" >> "$GITHUB_OUTPUT"
45+
4246
- name: Announce New Release in Slack
4347
uses: slackapi/[email protected]
4448
with:
@@ -62,7 +66,7 @@ jobs:
6266
"type": "section",
6367
"text": {
6468
"type": "mrkdwn",
65-
"text": ":star: *What's New*:\n\n${{ github.event.release.body }}"
69+
"text": ":star: *What's New*:\n\n${{ steps.update.outputs.release_body_escaped }}"
6670
}
6771
},
6872
{

0 commit comments

Comments
 (0)