Skip to content

Commit 015a26b

Browse files
committed
updated release workflow
1 parent 22750a5 commit 015a26b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/release.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,22 @@ jobs:
4848
with:
4949
name: Archive-v${{ env.LIBRARY_VERSION }}
5050
path: dist/*
51+
- name: Create release notes
52+
run: |
53+
grep -Pzo '(?s)^## \[${{ env.LIBRARY_VERSION }}\].*?(?=## \[)' CHANGELOG.md | sed '$ s/.$//' > RELEASE_NOTES.md
54+
sed -i 's/\[${{ env.LIBRARY_VERSION }}\]/Release [v${{ env.LIBRARY_VERSION }}]/' RELEASE_NOTES.md
5155
- name: Create release
5256
uses: ncipollo/release-action@v1
5357
env:
5458
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5559
with:
56-
name: ${{ env.LIBRARY_VERSION }}
60+
name: v${{ env.LIBRARY_VERSION }}
5761
draft: true
5862
prerelease: false
5963
makeLatest: true
6064
skipIfReleaseExists: true
6165
replacesArtifacts: true
6266
removeArtifacts: true
6367
tag: "v${{ env.LIBRARY_VERSION }}"
64-
body: "Please see [CHANGELOG.md](${{ github.server_url }}/${{ github.repository }}/blob/main/CHANGELOG.md)"
68+
bodyFile: RELEASE_NOTES.md
6569
artifacts: dist/*

0 commit comments

Comments
 (0)