feat: add nightly releases via GoReleaser and Homebrew tap#825
feat: add nightly releases via GoReleaser and Homebrew tap#825gtrrz-victor wants to merge 1 commit intomainfrom
Conversation
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>
There was a problem hiding this comment.
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.YYYYMMDDtag 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 logwhile 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. |
|
|
||
| if [[ "$VERSION" == *-* ]]; then | ||
| # Prerelease (nightly): generate notes from git log | ||
| LATEST_STABLE=$(git describe --tags --abbrev=0 --match 'v[0-9]*' --exclude '*-*' HEAD^ 2>/dev/null || echo "") |
There was a problem hiding this comment.
For prerelease tags, git describe ... HEAD^ can select the previous stable tag when the nightly tag is created on the same commit as the latest stable release (e.g., right after cutting a stable release with no new commits). That would make the generated “Changes since …” section incorrect. Consider deriving the stable base tag directly from the prerelease tag name (e.g., strip the -nightly.* suffix) or run git describe against HEAD (relying on --exclude '*-*') so the latest stable tag is used consistently.
| LATEST_STABLE=$(git describe --tags --abbrev=0 --match 'v[0-9]*' --exclude '*-*' HEAD^ 2>/dev/null || echo "") | |
| LATEST_STABLE=$(git describe --tags --abbrev=0 --match 'v[0-9]*' --exclude '*-*' HEAD 2>/dev/null || echo "") |
|
|
||
| permissions: | ||
| contents: write | ||
|
|
There was a problem hiding this comment.
This workflow can be triggered by both the daily schedule and workflow_dispatch. Without a concurrency group, two runs can overlap and race while creating/pushing the same tag (one run may fail with “tag already exists” after the other pushes). Add a concurrency block (similar to .github/workflows/e2e.yml) to ensure only one nightly-tag job runs at a time.
| concurrency: | |
| group: nightly-release-${{ github.ref }} | |
| cancel-in-progress: true |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
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
|
|
||
| echo "Creating nightly tag: ${TAG}" | ||
| git tag "${TAG}" | ||
| git push origin "${TAG}" |
There was a problem hiding this comment.
Nightly tag push won't trigger release workflow
High Severity
The nightly workflow pushes tags using the default GITHUB_TOKEN (from actions/checkout), but GitHub Actions deliberately prevents events triggered by GITHUB_TOKEN from creating new workflow runs. This means the git push origin "${TAG}" will never trigger the release workflow's push: tags trigger, making the entire nightly release pipeline non-functional. A PAT or GitHub App token is needed for the checkout/push step.
Additional Locations (1)
| fi | ||
|
|
||
| DATE=$(date -u +%Y%m%d) | ||
| TAG="${LATEST_STABLE}-nightly.${DATE}" |
There was a problem hiding this comment.
Shall we also add the short hash to it?
| TAG="${LATEST_STABLE}-nightly.${DATE}" | |
| TAG="${LATEST_STABLE}-nightly.${DATE}.${SHORT_COMMIT_ID}" |
| fi | ||
| fi | ||
|
|
||
| LATEST_STABLE=$(git describe --tags --abbrev=0 --match 'v[0-9]*' --exclude '*-*' 2>/dev/null) |
There was a problem hiding this comment.
Not sure if we want current stable or current stable +1 patch. Because:
v0.5.0-nightly < v0.5.0 < v0.5.1
So if the current release is v0.5.0, semver wise I think the nightly would be v0.5.1-nightly... so that:
v0.5.0 < v0.5.1-nightly < v0.5.1
| # yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json | ||
| version: 2 | ||
| pro: true | ||
|
|
There was a problem hiding this comment.
I think for nightly:
prerelease: '{{ if .Prerelease }}true{{ end }}'


Summary
.github/workflows/nightly.yml) that creates daily prerelease tags (e.g.,v0.5.2-nightly.20260401) when new commits existentire-nightlyHomebrew cask and Scoop manifest with conditionalskip_uploadusing GoReleaser's.Prereleasetemplate variableHow it works
.Prereleaseroutes uploads: stable tags →entirecask/scoop, nightly tags →entire-nightlycask/scoopTest plan
goreleaser release --snapshot --cleanworkflow_dispatchentireio/homebrew-tapafter first nightly run🤖 Generated with Claude Code
Note
Medium Risk
Moderate risk because it changes release automation and packaging uploads (Homebrew/Scoop) and could affect how artifacts/notes are produced and published for both prerelease and stable tags.
Overview
Adds a scheduled
Nightly ReleaseGitHub Actions workflow that creates and pushes dailyvX.Y.Z-nightly.YYYYMMDDtags only when new commits exist since the last nightly.Updates the release workflow to generate release notes from
git logfor prerelease tags while keepingCHANGELOG.mdas a hard requirement for stable releases.Adjusts GoReleaser config to publish separate
entirevsentire-nightlyHomebrew casks and Scoop manifests using.Prerelease-gatedskip_upload, and suppresses Discord announcements for prereleases.Written by Cursor Bugbot for commit 0294128. Configure here.