Skip to content

Commit 81b4a4c

Browse files
committed
ci: generate changelog during release
1 parent e98f782 commit 81b4a4c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ jobs:
9999
if: steps.version.outputs.should_release == 'true'
100100
run: npm pkg set version="${{ steps.version.outputs.version }}"
101101

102+
- name: Update changelog
103+
if: steps.version.outputs.should_release == 'true'
104+
run: git-cliff --tag "${{ steps.version.outputs.tag }}" --output CHANGELOG.md
105+
102106
- name: Build
103107
if: steps.version.outputs.should_release == 'true'
104108
run: pnpm run --if-present build
@@ -109,7 +113,7 @@ jobs:
109113
set -euo pipefail
110114
git config user.name "github-actions[bot]"
111115
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
112-
git add package.json
116+
git add package.json CHANGELOG.md
113117
if git diff --cached --quiet; then
114118
git commit --allow-empty -m "chore(release): ${{ steps.version.outputs.tag }}"
115119
else

0 commit comments

Comments
 (0)