Skip to content

Commit fda050e

Browse files
committed
Generate release notes
1 parent e421311 commit fda050e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/publish.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,29 @@ jobs:
2020
steps:
2121
- name: Checkout
2222
uses: actions/checkout@v3
23+
with:
24+
fetch-depth: 0
2325
- name: Download artifact
2426
uses: actions/download-artifact@v3
2527
with:
2628
name: ${{ needs.build.outputs.artifact_name }}
2729
path: .
30+
- name: Generate release notes
31+
id: changelog
32+
run: |
33+
mkdir tmp
34+
outfile=tmp/changelog.txt
35+
echo "outfile=${outfile}" >> $GITHUB_OUTPUT
36+
npx --package standard-changelog@^2.0.0 --package conventional-changelog-conventionalcommits@^5.0.0 standard-changelog --preset conventionalcommits --release-count 2 --infile $outfile.tmp --outfile $outfile.tmp
37+
sed '1,3d' $outfile.tmp > $outfile
2838
- name: Create GitHub release
2939
uses: softprops/action-gh-release@v1
3040
with:
3141
token: ${{ secrets.GH_TOKEN }}
3242
fail_on_unmatched_files: true
3343
prerelease: ${{ contains(github.ref_name, '-') }}
3444
files: '*.tgz'
45+
body_path: ${{ github.workspace }}/${{ steps.changelog.outputs.outfile }}
3546
github:
3647
name: GitHub Packages
3748
uses: ./.github/workflows/_publish.yml

0 commit comments

Comments
 (0)