Skip to content

feat: add nightly releases via GoReleaser and Homebrew tap#825

Open
gtrrz-victor wants to merge 15 commits intomainfrom
gtrrz-victor/release-nightlys
Open

feat: add nightly releases via GoReleaser and Homebrew tap#825
gtrrz-victor wants to merge 15 commits intomainfrom
gtrrz-victor/release-nightlys

Conversation

@gtrrz-victor
Copy link
Copy Markdown
Contributor

@gtrrz-victor gtrrz-victor commented Apr 1, 2026

Summary

  • Add nightly cron workflow (.github/workflows/nightly.yml) that creates daily prerelease tags when new commits exist
  • Nightly tags bump the patch version: stable v0.5.4 → nightly v0.5.5-nightly.20260406.<commit>
  • Add entire@nightly Homebrew cask with conditional skip_upload using GoReleaser's .Prerelease template variable
  • Add conflicts between entire and entire@nightly casks to prevent both being installed
  • Add release.prerelease: auto so nightly GitHub releases are marked as prereleases
  • Update release workflow to generate release notes from git log for prerelease tags (stable releases still require CHANGELOG entry)
  • Skip Discord announcements for nightly releases
  • Add independent version check channels: nightly users get notified about newer nightlies, stable users about newer stable releases

How it works

  • Nightly workflow creates a tag → existing release workflow picks it up automatically
  • .Prerelease routes uploads: stable tags → entire cask, nightly tags → entire@nightly cask
  • Casks conflict with each other — users must uninstall one before installing the other
  • Version check uses /releases/latest for stable, /releases (filtered) for nightly
brew install --cask entireio/tap/entire          # stable
brew install --cask entireio/tap/entire@nightly   # nightly

Version scheme

Stable:  v0.5.4                              → entire cask
Nightly: v0.5.5-nightly.20260406.<commit>    → entire@nightly cask

Note

The scripts/install.sh curl-based installer does not support the nightly channel.

Test plan

  • Verify goreleaser config parses: goreleaser release --snapshot --clean
  • Test nightly tag creation with manual workflow_dispatch
  • Verify stable release still works (skip_upload doesn't affect non-prerelease tags)
  • Confirm nightly cask appears in entireio/homebrew-tap after first nightly run
  • Run version check tests: go test ./cmd/entire/cli/versioncheck/ -v

🤖 Generated with Claude Code

Add nightly build infrastructure that creates daily prerelease tags
(e.g., v0.5.2-nightly.20260401) and routes them to separate
entire-nightly cask/scoop entries using GoReleaser's .Prerelease
template variable for conditional skip_upload.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 1, 2026 15:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds automated nightly prerelease publishing that reuses the existing release pipeline, while routing package uploads/announcements differently for prereleases vs stable releases.

Changes:

  • Add a scheduled + manual “nightly” workflow that creates a daily vX.Y.Z-nightly.YYYYMMDD tag when new commits exist.
  • Update GoReleaser config to publish nightly builds to separate Homebrew/Scoop artifacts (entire-nightly) and to skip Discord announcements for prereleases.
  • Update the release workflow to generate prerelease notes from git log while still requiring CHANGELOG entries for stable releases.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
.goreleaser.yaml Adds nightly Homebrew cask + Scoop manifest and conditional upload/announce logic based on .Prerelease.
.github/workflows/release.yml Generates release notes differently for prerelease vs stable tags and keeps stable CHANGELOG enforcement.
.github/workflows/nightly.yml New scheduled workflow that creates/pushes a nightly prerelease tag when appropriate.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment @cursor review or bugbot run to trigger another review on this PR

gtrrz-victor and others added 4 commits April 6, 2026 11:55
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Paulo Gomes <paulo@entire.io>
- Rename cask to entire@nightly (Homebrew @ convention)
- Add cask conflicts between entire and entire@nightly
- Add release.prerelease: auto for GitHub prerelease marking
- Remove nightly scoop entry (defer to later)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 304506803573
Nightly tags are now one patch ahead of the latest stable release
(e.g., stable v0.5.4 → nightly v0.5.5-nightly.20260406.<commit>)
so version ordering is clear between channels.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 5cfe30222811
@gtrrz-victor gtrrz-victor force-pushed the gtrrz-victor/release-nightlys branch from 215806b to 60039ba Compare April 6, 2026 10:37
gtrrz-victor and others added 2 commits April 6, 2026 12:48
Move tag calculation to scripts/create-nightly-tag.sh and keep only
git tag/push in the workflow step. Script outputs the tag to stdout,
exits 2 to skip (tag already exists), or exits 1 on error.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: b802840318ae
Simplify skip_upload on stable entries by using the built-in auto
mode which skips prerelease tags automatically.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: a8ed4b7f5aca
@gtrrz-victor
Copy link
Copy Markdown
Contributor Author

Note: The scripts/install.sh curl-based installer does not support the nightly channel. Nightly builds are only distributed via Homebrew cask (brew install --cask entireio/tap/entire@nightly). If we want install.sh support for nightlies in the future, it would need to be updated to resolve nightly tags.

gtrrz-victor and others added 2 commits April 6, 2026 13:27
Nightly users now get update notifications for newer nightlies
instead of being compared against stable releases. Each channel
checks independently: stable uses /releases/latest, nightly
scans /releases for the latest prerelease with a -nightly. tag.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 5fce37dea825
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 276ad5e3ed81
@gtrrz-victor gtrrz-victor marked this pull request as ready for review April 6, 2026 11:50
@gtrrz-victor gtrrz-victor requested a review from a team as a code owner April 6, 2026 11:50
@gtrrz-victor
Copy link
Copy Markdown
Contributor Author

Fix: nightly tag push won't trigger release workflow

  • The default GITHUB_TOKEN cannot trigger other workflows (GitHub anti-recursion policy)
  • Added GitHub App token generation (actions/create-github-app-token) to nightly.yml
  • Passed the token to actions/checkout so git push uses the App identity
  • Tag push from the App token will now correctly trigger release.yml

Note: the App needs contents: write on the cli repo — verify this is configured.

gtrrz-victor and others added 2 commits April 6, 2026 13:56
The default GITHUB_TOKEN cannot trigger other workflows. Use the
GitHub App token so the nightly tag push triggers release.yml.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: dd3e143dc267
Separate the release notes generation into independent GitHub Actions
steps with conditional execution. Nightly changelog now only includes
commits since the last nightly tag, not the full diff from stable.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: e4b48203e68f
@gtrrz-victor
Copy link
Copy Markdown
Contributor Author

Refactor: split release notes into separate steps

  • Stable and nightly release notes are now generated in independent GitHub Actions steps with if: conditionals
  • Nightly changelog only shows commits since the last nightly tag (falls back to latest stable if first nightly)
  • Fixed git describe to use HEAD instead of HEAD^ per review feedback

Usage: mise run release vX.X.X
Creates a stable tag and reuses scripts/create-nightly-tag.sh
to generate a companion nightly tag on the same commit.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 66c28c7d0433
@gtrrz-victor
Copy link
Copy Markdown
Contributor Author

Added mise run release vX.X.X task

  • Creates stable tag + nightly tag on the same commit using scripts/create-nightly-tag.sh
  • Skips nightly gracefully if one already exists for the commit
  • Validates version format and clean working tree before tagging

- Push stable tag before nightly in release task to avoid race
- Remove stderr suppression on nightly script call
- Simplify error handling pattern in nightly workflow
- Remove unnecessary fetchErr intermediate variable
- Fix tag glob to anchor on dot before commit hash
- Use --sort=-creatordate for reliable nightly tag ordering
- Add t.Parallel() to TestIsNightly

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 7def65366a86
@gtrrz-victor
Copy link
Copy Markdown
Contributor Author

Addressed PR review findings (6 fixes)

Critical:

  • Stable tag now pushed before nightly in mise-tasks/release to avoid race
  • Removed 2>/dev/null stderr suppression on nightly script call
  • Simplified error handling in nightly.yml ($? instead of || EXIT_CODE=$?)

Important:

  • Removed unnecessary fetchErr intermediate in versioncheck.go
  • Fixed tag glob to v*-nightly.*.${SHORT_COMMIT} (anchored on dot)
  • Changed --sort=-v:refname to --sort=-creatordate in release.yml
  • Added t.Parallel() to TestIsNightly (fetch tests can't be parallel — they mutate global vars)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 1b647b49bc8f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants