Commit f8a3503
ci(release): Refuse to publish a tag whose commit is not on main
The release workflow triggers on any pushed v* tag, but a tag carries no
branch association, so tagging any commit on any branch published to Maven
Central. Check out full history and fail the release job unless the tagged
commit is an ancestor of origin/main. The guard runs before jdk-setup, so no
GPG key or Central credentials are imported for a rejected tag, and because
github-release needs the release job, a rejected tag also creates no GitHub
Release.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016phSDvM51hkfSYdjcGQrwz1 parent 6fc6beb commit f8a3503
1 file changed
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
30 | 47 | | |
31 | 48 | | |
32 | 49 | | |
| |||
0 commit comments