Skip to content

Commit e39b183

Browse files
author
Lasim
committed
fix: clean up empty markdown links and remove empty lines from release notes extraction
1 parent 2830b80 commit e39b183

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.github/workflows/backend-release-pr.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,16 @@ jobs:
7575
END { print content }
7676
' CHANGELOG.md)
7777
78-
# Remove leading/trailing whitespace and save to output
78+
# Clean up empty markdown links and remove empty lines
79+
CLEAN_NOTES=$(echo "$RELEASE_NOTES" | sed 's/(\[\]([^)]*))//g' | sed '/^$/d')
80+
81+
# Save to output
7982
echo "release_notes<<EOF" >> $GITHUB_OUTPUT
80-
echo "$RELEASE_NOTES" | sed '/^$/d' >> $GITHUB_OUTPUT
83+
echo "$CLEAN_NOTES" >> $GITHUB_OUTPUT
8184
echo "EOF" >> $GITHUB_OUTPUT
8285
8386
echo "Release notes extracted:"
84-
echo "$RELEASE_NOTES"
87+
echo "$CLEAN_NOTES"
8588
else
8689
echo "No CHANGELOG.md found"
8790
echo "release_notes=" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)