Skip to content

Commit 6f798c6

Browse files
committed
ci: 修复没有更新日志提供器的问题
1 parent 8fe0210 commit 6f798c6

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,20 @@ jobs:
3232
- name: Build package
3333
run: pnpm build
3434

35-
# Automatically generate changelog and update package.json version
35+
# Generate changelog and update package.json version
36+
- name: Generate changelog
37+
run: npx standard-version --release-as ${{ github.event.release.tag_name }} --no-verify
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
41+
# Push changelog and package.json back to main
3642
- name: Push changelog back to main
3743
run: |
3844
git config user.name "github-actions[bot]"
3945
git config user.email "github-actions[bot]@users.noreply.github.com"
4046
git pull origin main --rebase # Ensure the branch is up-to-date
41-
cp CHANGELOG.md CHANGELOG.md # Note: This line seems unnecessary; verify if needed
4247
git add CHANGELOG.md package.json
43-
git commit -m "docs(release): update changelog [skip ci]" || echo "No changes to commit"
48+
git commit -m "docs(release): update changelog and version [skip ci]" || echo "No changes to commit"
4449
git push origin main
4550
env:
4651
GIT_AUTHOR_NAME: github-actions[bot]

0 commit comments

Comments
 (0)