Skip to content

Commit bbc197a

Browse files
committed
chore: upgrade changelog notes injection process in staging workflow
Signed-off-by: Ilona Shishov <[email protected]>
1 parent 4381575 commit bbc197a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/stage.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,18 @@ jobs:
8181
run: |
8282
version="${{ steps.bump.outputs.version }}"
8383
version=${version#v}
84-
notes=$(sed -n "/## $version/,/^##/p" ./CHANGELOG.md | grep -v '##')
84+
notes=$(echo -e "## Changelog\n$(sed -n "/## $version/,/^##/p" ./CHANGELOG.md | grep -v '##')")
8585
if [ -z "$notes" ]; then
8686
echo "Release notes are missing for version $version."
8787
exit 1
8888
else
8989
echo "version=$version" >> "$GITHUB_OUTPUT"
9090
91-
notes="${notes//$'`'/%60}"
91+
notes="${notes//$'\''/%27}"
92+
notes="${notes//$'\n'/'%0A'}"
93+
notes="${notes//$'\r'/'%0D'}"
9294
delimiter="$(openssl rand -hex 8)"
9395
echo "notes<<${delimiter}" >> "$GITHUB_OUTPUT"
94-
echo "## Changelog" >> "$GITHUB_OUTPUT"
9596
echo "$notes" >> "$GITHUB_OUTPUT"
9697
echo "${delimiter}" >> "$GITHUB_OUTPUT"
9798
fi

0 commit comments

Comments
 (0)