File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments