Skip to content

Add automated nightly build (rolling GitHub prerelease) - #1087

Merged
cdalar merged 2 commits into
mainfrom
nightly-build
Sep 6, 2026
Merged

cdalar merged 2 commits into
mainfrom
nightly-build

Conversation

@cdalar

@cdalar cdalar commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds .github/workflows/nightly.yml + .goreleaser.nightly.yml: builds and publishes an unsigned "nightly" onctl binary (Linux amd64/arm64, Windows amd64) from the tip of main on every push, as a single rolling nightly GitHub prerelease (always overwritten, always at github.com/cdalar/onctl/releases/tag/nightly) — so a host can pick up a just-merged fix (e.g. fc: give every microVM its own guest hostname #1074's per-VM guest hostname) without waiting for a tagged, signed release.
  • GoReleaser's own Nightlies feature is Pro-only — confirmed live: the installed OSS 2.17.0 CLI's goreleaser release --help has no --nightly flag, and this repo's goreleaser.yml already uses the free distribution: goreleaser (not goreleaser-pro, with GORELEASER_KEY commented out). Also checked whether a separate "beta" feature might be free instead — GoReleaser's own docs describe "beta builds or a rolling-release system" as just alternate phrasing for the same Pro-only Nightlies feature, not a distinct one.
  • So this uses the free --snapshot flag (unversioned artifacts, skips all publishing/validation) against a dedicated .goreleaser.nightly.yml — Linux/Windows only, no macOS build, no GPG/quill signing, no homebrew tap publish, none of which apply to a nightly — then the workflow itself deletes+recreates the nightly release/tag via gh release, rather than reusing goreleaser.yml's config with skip flags.
  • Runs on plain GH-hosted ubuntu-latest, not the self-hosted macOS/ARM64 runner goreleaser.yml uses (that one exists only for the macOS notarization step, which this workflow never builds).

Test plan

  • Validated .goreleaser.nightly.yml by actually running goreleaser release --snapshot --clean -f .goreleaser.nightly.yml --skip=publish locally — succeeded, produced real linux_amd64/linux_arm64/windows_amd64 archives + checksums in ~34s
  • Extracted the linux/amd64 binary and confirmed it's a valid stripped ELF executable
  • YAML syntax validated for both new files
  • First real run happens automatically once this merges (workflow triggers on push to main) — will check it publishes the nightly release correctly

🤖 Generated with Claude Code

https://claude.ai/code/session_01F75TsjPk2tV2RD1rizu6eF

goreleaser's own Nightlies feature is Pro-only (verified: `goreleaser
release --help` on the installed OSS 2.17.0 CLI has no --nightly flag) --
this uses the free --snapshot flag against a dedicated Linux/Windows-only
.goreleaser.nightly.yml (no macOS build, no signing, no homebrew publish),
then the workflow itself replaces a single rolling `nightly` prerelease/
tag on every push to main. Lets a host (e.g. aimax) pick up a just-merged
fix like #1074's per-VM guest hostname without waiting for a tagged,
GPG-signed, Apple-notarized release.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F75TsjPk2tV2RD1rizu6eF

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 045a1b98a8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .goreleaser.nightly.yml Resolved
Comment thread .github/workflows/nightly.yml Resolved
…ze runs

Two real bugs from automated review, both reproduced locally before
fixing:
- Once the `nightly` tag exists, checkout's fetch-depth:0 pulls it down,
  and GoReleaser's version discovery picks it as "the current tag" --
  then fails outright since `incpatch` can't operate on a non-semver tag.
  Confirmed live: tagging HEAD `nightly` locally broke the exact same
  build that succeeded moments before. Fixed by deleting the local tag
  ref right after checkout, before GoReleaser runs.
- No concurrency group meant two overlapping pushes could each
  independently delete+recreate the release, with whichever finishes last
  winning -- if that's the older push, the rolling release goes stale.
  Fixed with a concurrency group that cancels an in-progress run as soon
  as a newer push starts.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F75TsjPk2tV2RD1rizu6eF
@cdalar
cdalar merged commit 7c0155b into main Sep 6, 2026
12 checks passed
@cdalar
cdalar deleted the nightly-build branch September 6, 2026 16:34
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

⌂ 换网址