From a1969a5c94ccb4c1963b14c89128c863e4097a87 Mon Sep 17 00:00:00 2001 From: "ROOT\\h7ml" Date: Wed, 11 Dec 2024 19:49:49 +0800 Subject: [PATCH] =?UTF-8?q?ci(release):=20=E4=BC=98=E5=8C=96=20GitHub=20Ac?= =?UTF-8?q?tions=20=E5=8F=91=E5=B8=83=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 配置本地 git 用户信息和邮箱 - 关闭 hook 提示信息 - 添加版本号到提交信息中 - 使用 '|| echo "No changes to commit"' 避免在没有更改时出错 --- .github/workflows/release.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 267c2ab..19dccb8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 "action@h7ml.cn" + 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