Skip to content

Commit

Permalink
Update release note generation command (#12920)
Browse files Browse the repository at this point in the history
* Update release note generation command

This newer approach doesn't depend on tags being merged into a single branch, and works with our release branch strategy

* Update `git tag` command in release note generation

Add optional pattern arg to list command, so only version tags starting with v are processed
  • Loading branch information
SarahFrench committed Nov 1, 2022
1 parent dbb48be commit 3942bf8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ jobs:
with:
fetch-depth: 0
- name: Generate Release Notes
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
run: |
export PREV_TAG=$(git tag --list 'v*' --sort=-version:refname | head -n 2 | tail -n 1)
export PREV_VERSION=${PREV_TAG//v}
sed -n -e "1{/# /d;}" -e "2{/^$/d;}" -e "/# $PREV_VERSION/q;p" CHANGELOG.md > release-notes.txt
- uses: actions/upload-artifact@v2
with:
name: release-notes
Expand Down

0 comments on commit 3942bf8

Please sign in to comment.