Mirror Stable Tags to Nightly Channel

Claude Code·Opus 4.8[1m]·Soph·2mo ago·2hr 42min·1 Checkpoint·1 file change·+49/-2·53.9K tokens

can you look at the release logic we have right now, if we do a tagged release the issue is that nighly only gets an update of the same things once nightly regularly runs. Can we do a release on both stable and nightly channel if we do a release through a stable tag?

2mo ago·1h 25m

Done. Here's what I changed and why.

What I changed

.github/workflows/release.yml — one new job plus two supporting tweaks:

  1. release job now exposes outputs.prerelease (from the existing release-type step).
  2. New mirror-nightly job — runs only after a successful stable release (prerelease == 'false'). It checks out the exact stable commit and runs the existing scripts/create-nightly-tag.sh to cut and push a nightly tag from that commit.
  3. notify-slack now also fires if the mirror step fails.

How it works end-to-end

  • You push a stable tag v0.5.5 → release job publishes the stable cask (unchanged).
  • mirror-nightly then cuts v0.5.6-nightly.<date>.<v0.5.5-commit> and pushes it.
  • That push re-triggers release.yml on the nightly-tag path → GoReleaser uploads the entire@nightly cask, built from the identical stable code.
  • Nightly users on 0.5.5-nightly.* upgrade to 0.5.6-nightly.* (semver-correct), so they get the release immediately instead of waiting for the 06:00 UTC cron — which, note, would have skipped anyway since create-nightly-tag.sh bails when HEAD already has a nightly.

Key correctness details

  • App token, not GITHUB_TOKEN: the mirror job mints a cli-scoped GitHub App token (same pattern as nightly.yml). A GITHUB_TOKEN-authored tag push is suppressed by GitHub to prevent recursion — which would have silently left the nightly cask un-uploaded.
  • No infinite loop: the re-triggered run is a nightly (prerelease) tag, so mirror-nightly's if is false there.
  • Idempotent: if a nightly already points at the stable commit, create-nightly-tag.sh exits 2 and the step no-ops.
  • Clean channel identity: because the nightly binary is stamped with a real -nightly version, versioncheck/brew upgrade keep treating those users as nightly channel — the pitfall of the cheaper cask-config approach (Option A) is avoided.

Cost tradeoff (as flagged)

Every stable release now runs GoReleaser twice (including a second macOS notarization pass) and creates one extra nightly GitHub release/tag. That's inherent to keeping the nightly channel truly -nightly-versioned.

I validated the YAML parses and the job graph/conditions are correct. actionlint isn't installed here, so if you want the deeper Actions-expression lint before merging, I can add it or you can run it in CI. Want me to commit this on the current soph/release-nightly branch?

can you open a draft PR?

2mo ago·1m

Done. Draft PR is up:

#1662 — release: mirror stable tags to the nightly channel → https://github.com/entireio/cli/pull/1662

  • draft: true, base main ← soph/release-nightly
  • One commit, single-file change to .github/workflows/release.yml

One thing to flag before you mark it ready: the mirror-nightly job needs the HOMEBREW_TAP_APP GitHub App to have write access to the cli repo (contents/workflows) so it can push the nightly tag. nightly.yml already requests repositories: cli from the same app, so this should already be granted — worth a quick confirm since a push failure there is the main way this job could break.