Commit 6e8682f
authored
Fix nightly release: scope homebrew cask to vigilante archives, gate publish to main (#464)
* ci: scope homebrew cask to vigilante archive id and gate nightly publish to main
The nightly release was failing at the homebrew cask stage with:
one tap can handle only one archive of an OS/Arch combination.
Consider using ids in the homebrew_casks section
Both `vigilante` and `gh-sandbox` produce Linux amd64/arm64 archives, so
the unscoped homebrew_casks entry tried to template both into a single
cask and collided. Filter the cask to the `release-archives` archive id
(which already pins to the `vigilante` build) so gh-sandbox artifacts
are excluded from the cask template while still shipping as release
assets.
Also harden the workflow so it only publishes/updates external
artifacts when running on `main`. Non-main pushes (currently used as a
temporary verification branch for this fix) exercise the goreleaser
build step but skip the rolling prerelease, nightly verification, and
Homebrew tap update. The `main`-only gates are the permanent behavior;
the branch entry under `on.push.branches` is temporary and will be
removed once this run is confirmed green.
Local verification:
- goreleaser check — pass
- goreleaser release --snapshot --clean --skip=publish — pass; the
generated dist/homebrew/Casks/vigilante.rb references only the
vigilante archives (macOS amd64/arm64, Linux amd64).
* ci: make environment and tap-token step main-only for nightly
Branch pushes hit environment protection rules before the job could
even start, because the job unconditionally required environment `main`
and that environment is gated to `main`. Make the environment
conditional so non-main verification pushes still build the goreleaser
snapshot, and gate the `Get token for Homebrew tap` step to main since
its secrets are only available inside the `main` environment.
On main pushes the behavior is identical to before.
* ci: remove temporary branch entry from nightly trigger
Nightly run 24846173714 on this branch succeeded with the goreleaser
homebrew_casks fix in place (build step passed; publish/tap steps
correctly skipped off-main). Drop the temporary branch entry from the
push trigger list so nightly only fires on main again.
The permanent main-only gates on the publish/verify/tap steps and the
conditional `environment: main` stay in place as a safety net.1 parent 18c1c21 commit 6e8682f
2 files changed
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| |||
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| 53 | + | |
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
| |||
65 | 68 | | |
66 | 69 | | |
67 | 70 | | |
| 71 | + | |
68 | 72 | | |
69 | 73 | | |
70 | 74 | | |
| |||
96 | 100 | | |
97 | 101 | | |
98 | 102 | | |
| 103 | + | |
99 | 104 | | |
100 | 105 | | |
101 | 106 | | |
102 | 107 | | |
103 | 108 | | |
104 | 109 | | |
105 | 110 | | |
| 111 | + | |
106 | 112 | | |
107 | 113 | | |
108 | 114 | | |
109 | 115 | | |
110 | 116 | | |
111 | 117 | | |
| 118 | + | |
112 | 119 | | |
113 | 120 | | |
114 | 121 | | |
| |||
117 | 124 | | |
118 | 125 | | |
119 | 126 | | |
| 127 | + | |
120 | 128 | | |
121 | 129 | | |
122 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
| |||
0 commit comments