Skip to content

Commit

Permalink
Extract section from changelog
Browse files Browse the repository at this point in the history
The automatic release notes did not include the tag annotation. Extract
notes from the changelog instead.
  • Loading branch information
aherrmann committed Oct 18, 2023
1 parent ca3e759 commit dc1f581
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# Cut a release whenever a new tag is pushed to the repo.
# You should use an annotated tag, like `git tag -a v1.2.3 --cleanup=whitespace`
# and put the release notes into the commit message for the tag.
# The `--cleanup` flag avoids markdown headings being stripped as comments.
name: Release

on:
Expand All @@ -24,8 +21,19 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get version number
id: get-version
run: set -x; echo "version=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT
- name: Read section from CHANGELOG.md
id: extract-changelog
uses: sean0x42/markdown-extract@v2
with:
file: CHANGELOG.md
pattern: ${{ steps.get-version.outputs.version }}
- name: Prepare release notes and artifacts
run: .github/workflows/release_prep.sh ${{ env.GITHUB_REF_NAME }} > release_notes.txt
run: |
.github/workflows/release_prep.sh ${{ env.GITHUB_REF_NAME }} > release_notes.txt
printf '${{ steps.extract-changelog.outputs.markdown }}' >> release_notes.txt
- name: Release
uses: softprops/action-gh-release@v1
with:
Expand Down

0 comments on commit dc1f581

Please sign in to comment.