fix: release notes

This commit is contained in:
Alexis Tyler
2021-03-28 09:55:35 -07:00
parent 288fa4e9f7
commit 9842ea1149

View File

@@ -205,12 +205,10 @@ jobs:
- name: Create release notes
run: |
# Reverse function
reverse(){ local line;if IFS= read -r line;then reverse;printf '%s\n' "$line";fi;}; \
# Get the last release tag
LAST_RELEASE=$(git tag --list --sort=v:refname|reverse|sed -n 2p); \
# Create the release notes
RELEASE_NOTES=$(git log "$LAST_RELEASE...HEAD~1" --pretty=format:"- %s [\`%h\`](http://github.com/$ORG/$REPO/commit/%H)" --reverse) \
LAST_RELEASE=$(git tag --list --sort=v:refname | grep -v 'alpha\|beta\|rc' | tail -1); \
# Get all the commit messages between now and the last tag
RELEASE_NOTES=$(git log "$LAST_RELEASE...HEAD" --pretty=format:"- %s [\`%h\`](http://github.com/$ORG/$REPO/commit/%H)" --reverse) \
# Save release notes to a file
echo $RELEASE_NOTES > RELEASE_NOTES.md