Skip to content

Commit 8f0b486

Browse files
committed
ci(changelog): add changelog generation to release workflow
1 parent a87921b commit 8f0b486

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

.github/workflows/publish-to-auto-release.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ jobs:
2929
runs-on: ${{ matrix.platform }}
3030
steps:
3131
- uses: actions/checkout@v4
32+
with:
33+
fetch-depth: 0
34+
fetch-tags: true
3235

3336
- name: setup node
3437
uses: actions/setup-node@v4
@@ -61,13 +64,23 @@ jobs:
6164
run: |
6265
perl -pi -e 's/^version = ".*"/version = "${{ env.VERSION }}"/' src-tauri/Cargo.toml
6366
67+
- name: install git-cliff
68+
run: cargo install git-cliff || true
69+
70+
- name: generate changelog
71+
id: changelog
72+
run: |
73+
echo 'changelog<<EOF' >> $GITHUB_OUTPUT
74+
git-cliff --latest --strip all --use-branch-tags >> $GITHUB_OUTPUT
75+
echo 'EOF' >> $GITHUB_OUTPUT
76+
6477
- uses: tauri-apps/tauri-action@v0
6578
env:
6679
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6780
with:
6881
tagName: v${{ env.VERSION }}
6982
releaseName: v${{ env.VERSION }}
70-
releaseBody: "See the assets to download this version and install."
83+
releaseBody: "${{ steps.changelog.outputs.changelog }}"
7184
releaseDraft: true
7285
prerelease: true
7386
args: ${{ matrix.args }}

0 commit comments

Comments
 (0)