Skip to content

Commit 3bf968c

Browse files
committed
Add job to generate release notes
1 parent cda9dae commit 3bf968c

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,29 @@ jobs:
2222
steps:
2323
- name: Checkout
2424
uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
2527
- name: Download artifact
2628
uses: actions/download-artifact@v4
2729
with:
2830
name: ${{ needs.build.outputs.artifact_name }}
2931
path: dist/
32+
- name: Generate release notes
33+
id: changelog
34+
run: |
35+
mkdir tmp
36+
outfile=tmp/changelog.txt
37+
echo "outfile=${outfile}" >> $GITHUB_OUTPUT
38+
npx standard-changelog@^5.0.0 --release-count 2 --infile $outfile.tmp --outfile $outfile.tmp
39+
sed '1,3d' $outfile.tmp > $outfile
3040
- name: Create GitHub release
3141
uses: softprops/action-gh-release@v2
3242
with:
3343
token: ${{ secrets.GH_TOKEN }}
3444
fail_on_unmatched_files: true
3545
prerelease: ${{ contains(github.ref_name, 'a') || contains(github.ref_name, 'b') || contains(github.ref_name, 'rc') }}
3646
files: dist/*
47+
body_path: ${{ github.workspace }}/${{ steps.changelog.outputs.outfile }}
3748
pypi:
3849
name: PyPI
3950
uses: ./.github/workflows/_publish.yml

0 commit comments

Comments
 (0)