Skip to content

Fix nightly release: scope homebrew cask to vigilante archives, gate publish to main - #464

Merged
nicobistolfi merged 3 commits into
mainfrom
fix/goreleaser-homebrew-cask-ids
Apr 23, 2026
Merged

Fix nightly release: scope homebrew cask to vigilante archives, gate publish to main#464
nicobistolfi merged 3 commits into
mainfrom
fix/goreleaser-homebrew-cask-ids

Conversation

@nicobistolfi

Copy link
Copy Markdown
Collaborator

Summary

Fix the Nightly Release job that has been failing on every push to main since gh-sandbox joined the goreleaser build. The homebrew cask stage errored with:

one tap can handle only one archive of an OS/Arch combination.
Consider using ids in the homebrew_casks section

because the unscoped homebrew_casks entry tried to template the Linux amd64/arm64 archives from both vigilante and gh-sandbox into a single cask.

Changes

  • .goreleaser.yml — scope the homebrew_casks.vigilante entry to ids: [release-archives], which is already the vigilante-only archive. gh-sandbox-archives still ship as release assets, they just don't participate in the cask template.
  • .github/workflows/nightly.yml — gate the side-effectful steps (rolling prerelease publish, nightly-release verification, homebrew tap checkout/update/push) to github.ref == 'refs/heads/main'. Non-main pushes now exercise goreleaser check, the snapshot build, and the snapshot cask template (the actual former failure point), but cannot overwrite the main-nightly tag, assets, or Homebrew tap. This is a permanent safety net and should stay after this PR.
  • Adds the fix branch to on.push.branches temporarily so a nightly run fires on the branch to prove the build step works end-to-end. That trigger entry will be removed before merge.

Local verification

  • goreleaser check — pass.
  • NIGHTLY_VERSION=0.0.0-nightly.test.local ... goreleaser release --snapshot --clean --skip=publish — pass. Generated dist/homebrew/Casks/vigilante.rb references only the vigilante archives (macOS amd64, macOS arm64, Linux amd64) — no gh-sandbox. No one tap can handle only one archive error.

Rollout

  1. Push this PR's branch — nightly workflow runs on the branch (build-only, publish gated off), verifies the fix.
  2. Once the run is green, remove the branch from on.push.branches in a follow-up commit on this PR.
  3. Merge. The next main push will resume successful nightly publishing.

Refs: https://github.com/aliengiraffe/vigilante/actions/runs/24843180124/job/72722701900 and the four previous nightly runs that hit the same error.

…ish 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).
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Apr 23, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
vigilante b3fca59 Commit Preview URL

Branch Preview URL
Apr 23 2026, 04:19 PM

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.
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.
@nicobistolfi

Copy link
Copy Markdown
Collaborator Author

✅ Branch nightly run succeeded — temporary trigger removed

Nightly run on this branch (commit 1a1eb80): https://github.com/aliengiraffe/vigilante/actions/runs/24846173714success in 35s.

Step outcomes on the branch run (as intended):

  • ✅ Validate GoReleaser config
  • ✅ Build nightly snapshot artifacts ← the former failure point
  • ⏭️ Get token for Homebrew tap (skipped, main-only)
  • ⏭️ Publish rolling prerelease (skipped, main-only)
  • ⏭️ Verify nightly release publication (skipped, main-only)
  • ⏭️ Check out / Update / Push Homebrew tap (skipped, main-only)

Pushed b3fca59 to remove the temporary fix/goreleaser-homebrew-cask-ids entry from on.push.branches. The permanent main-only gates on the publish/verify/tap steps and the conditional environment: main stay in place as a safety net.

Ready to merge.

@nicobistolfi
nicobistolfi merged commit 6e8682f into main Apr 23, 2026
2 checks passed
@nicobistolfi
nicobistolfi deleted the fix/goreleaser-homebrew-cask-ids branch April 23, 2026 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant