Commit 42a65db
ci(release): guard release workflow against non-main dispatch
Add if: github.ref == 'refs/heads/main' to both jobs in release.yml so
that an accidental workflow_dispatch from develop or a feature branch
exits without bumping the version, tagging, or publishing.
The guard goes on each job (not at workflow level) because workflow-level
if: is not valid for workflow_dispatch.
Trigger remains workflow_dispatch:. The review document suggested
migrating to tag-based push triggers, but this workflow creates the tag
itself, so reacting to its own tag would be circular. Dispatch with a
hard branch guard is the right pattern here.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 211494a commit 42a65db
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
| 74 | + | |
73 | 75 | | |
74 | 76 | | |
75 | 77 | | |
| |||
0 commit comments