-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automatically update GitHub release notes
when releasing a GitHub pre-release.
- Loading branch information
Showing
5 changed files
with
45 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
# This script gets all changelog entries from CHANGELOG.md since last release. | ||
|
||
set -e | ||
|
||
tempDir="$(mktemp -d)" | ||
tempFile=$tempDir/gh_release_notes.md | ||
|
||
# Get changelog entries since last release | ||
cat CHANGELOG.md | \ | ||
grep -Pazo '(?s)(?<=\#{2} \[Unreleased\]\n{2}).*?(?=\n\#{2} v|$)' \ | ||
> $tempFile | ||
|
||
# Improve readability and add some icons | ||
sed -i -E 's/(###) (Added)/\1 🚀 \2/' $tempFile | ||
sed -i -E 's/(###) (Changed)/\1 🔨 \2/' $tempFile | ||
sed -i -E 's/(###) (Fixed)/\1 🐛 \2/' $tempFile | ||
sed -i 's/\x0//g' $tempFile | ||
|
||
cat $tempFile | ||
|
||
# Cleanup temporary files | ||
trap 'rm -rf -- "$tempDir"' EXIT |