在 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]>
@@ -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"