Explorar o código

fix: 排除 workflow 文件的自动提交以避免权限问题

在 release pipeline 中添加 git restore --staged .github/ 命令,
防止 GitHub Actions Bot 尝试提交 workflow 文件导致权限错误。

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
ding113 hai 3 meses
pai
achega
427182c22d
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      .github/workflows/release.yml

+ 3 - 0
.github/workflows/release.yml

@@ -185,6 +185,9 @@ jobs:
           # 添加所有更改(VERSION文件 + 格式化后的代码 + 价格表)
           git add -A
 
+          # 排除 .github/ 目录的更改(workflow 文件不需要自动提交,且需要特殊权限)
+          git restore --staged .github/ 2>/dev/null || true
+
           # 检查是否有更改需要提交
           if git diff --cached --quiet; then
             echo "No changes to commit"