From 9842ea1149cd31350019d1616c1e5a6f505f8a97 Mon Sep 17 00:00:00 2001 From: Alexis Tyler Date: Sun, 28 Mar 2021 09:55:35 -0700 Subject: [PATCH] fix: release notes --- .github/workflows/main.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 44d459dc6..83ed3e8b0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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