Skip to content

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

Draft
gtrrz-victor wants to merge 1 commit intomainfrom
gtrrz-victor/release-nightlys
Draft

feat: add nightly releases via GoReleaser and Homebrew tap#825
gtrrz-victor wants to merge 1 commit 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 (e.g., v0.5.2-nightly.20260401) when new commits exist
  • Add entire-nightly Homebrew cask and Scoop manifest with conditional skip_upload using GoReleaser's .Prerelease template variable
  • 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

How it works

  • Nightly workflow creates a tag → existing release workflow picks it up automatically
  • .Prerelease routes uploads: stable tags → entire cask/scoop, nightly tags → entire-nightly cask/scoop
brew install --cask entireio/tap/entire          # stable
brew install --cask entireio/tap/entire-nightly   # nightly

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

🤖 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 Release GitHub Actions workflow that creates and pushes daily vX.Y.Z-nightly.YYYYMMDD tags only when new commits exist since the last nightly.

Updates the release workflow to generate release notes from git log for prerelease tags while keeping CHANGELOG.md as a hard requirement for stable releases.

Adjusts GoReleaser config to publish separate entire vs entire-nightly Homebrew casks and Scoop manifests using .Prerelease-gated skip_upload, and suppresses Discord announcements for prereleases.

Written by Cursor Bugbot for commit 0294128. Configure here.

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.


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 "")
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
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 "")

Copilot uses AI. Check for mistakes.

permissions:
contents: write

Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
concurrency:
group: nightly-release-${{ github.ref }}
cancel-in-progress: true

Copilot uses AI. Check for mistakes.
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


echo "Creating nightly tag: ${TAG}"
git tag "${TAG}"
git push origin "${TAG}"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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)
Fix in Cursor Fix in Web

fi

DATE=$(date -u +%Y%m%d)
TAG="${LATEST_STABLE}-nightly.${DATE}"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Shall we also add the short hash to it?

Suggested change
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)
Copy link
Copy Markdown
Member

@pjbgf pjbgf Apr 1, 2026

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think for nightly:

prerelease: '{{ if .Prerelease }}true{{ end }}'

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