File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5151 run : |
5252 git diff --exit-code || echo "has_changes=true" >> $GITHUB_OUTPUT
5353
54- - name : Commit formatting fixes
55- if : steps.fmt_diff.outputs.has_changes == 'true' && github.event_name == 'push'
54+ - name : Commit formatting fixes (branch only)
55+ if : steps.fmt_diff.outputs.has_changes == 'true' && github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/')
5656 working-directory : .
5757 run : |
5858 git config --local user.email "github-actions[bot]@users.noreply.github.com"
6161 git commit -m "style: auto-fix cargo fmt"
6262 git push
6363
64+ - name : Warn on tag push with formatting issues
65+ if : steps.fmt_diff.outputs.has_changes == 'true' && startsWith(github.ref, 'refs/tags/')
66+ working-directory : .
67+ run : |
68+ echo "⚠️ Formatting issues exist but continuing for tag release."
69+ echo "Run 'cargo fmt --all' before tagging next time."
70+
6471 - name : Fail on PR with formatting issues
6572 if : steps.fmt_diff.outputs.has_changes == 'true' && github.event_name == 'pull_request'
6673 run : |
You can’t perform that action at this time.
0 commit comments