Skip to content

Commit 33ae659

Browse files
authored
Update release note generation command (#4827)
Duplicate of PR #12920 in the the TPG repo
1 parent 577377f commit 33ae659

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ jobs:
2424
with:
2525
fetch-depth: 0
2626
- name: Generate Release Notes
27-
run: sed -n -e "1{/# /d;}" -e "2{/^$/d;}" -e "/# $(git describe --abbrev=0 --exclude="$(git describe --abbrev=0 --match='v*.*.*' --tags)" --match='v*.*.*' --tags | tr -d v)/q;p" CHANGELOG.md > release-notes.txt
27+
run: |
28+
export PREV_TAG=$(git tag --list 'v*' --sort=-version:refname | head -n 2 | tail -n 1)
29+
export PREV_VERSION=${PREV_TAG//v}
30+
sed -n -e "1{/# /d;}" -e "2{/^$/d;}" -e "/# $PREV_VERSION/q;p" CHANGELOG.md > release-notes.txt
2831
- uses: actions/upload-artifact@v2
2932
with:
3033
name: release-notes

0 commit comments

Comments
 (0)