Skip to content

Commit

Permalink
ci(release): 优化 GitHub Actions 发布流程
Browse files Browse the repository at this point in the history
- 配置本地 git 用户信息和邮箱
- 关闭 hook 提示信息
- 添加版本号到提交信息中
- 使用 '|| echo "No changes to commit"' 避免在没有更改时出错
  • Loading branch information
h7ml committed Dec 11, 2024
1 parent 0dad053 commit a1969a5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,12 @@ jobs:
- name: Commit and Push
run: |
git add CHANGELOG.md
git commit -m "chore: update changelog"
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git config advice.ignoredHook false
VERSION=${GITHUB_REF#refs/tags/v}
git commit -m "chore(release): update CHANGELOG for v$VERSION [skip ci]" -a || echo "No changes to commit"
git push
- name: Upload Release Assets
uses: softprops/action-gh-release@v1
Expand Down

0 comments on commit a1969a5

Please sign in to comment.