Skip to content

Commit 3aef655

Browse files
Merge pull request #109 from detiber/generateReleaseNotes
Automatically generate the release notes using the github api
2 parents 41a7ae3 + eb3a339 commit 3aef655

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/tags.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@ jobs:
99
steps:
1010
- name: Checkout code
1111
uses: actions/checkout@v2
12+
- name: Generate Release Notes
13+
run: |
14+
release_notes=$(gh api repos/{owner}/{repo}/releases/generate-notes -F tag_name=${{ github.ref }} --jq .body)
15+
echo 'RELEASE_NOTES<<EOF' >> $GITHUB_ENV
16+
echo "${release_notes}" >> $GITHUB_ENV
17+
echo 'EOF' >> $GITHUB_ENV
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+
OWNER: ${{ github.repository_owner }}
21+
REPO: ${{ github.event.repository.name }}
1222
- name: Create Release
1323
id: create_release
1424
uses: actions/create-release@v1
@@ -17,5 +27,6 @@ jobs:
1727
with:
1828
tag_name: ${{ github.ref }}
1929
release_name: Release ${{ github.ref }}
30+
body: ${{ env.RELEASE_NOTES }}
2031
draft: false
2132
prerelease: false

0 commit comments

Comments
 (0)