-
Notifications
You must be signed in to change notification settings - Fork 294
feat: add nightly releases via GoReleaser and Homebrew tap #825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
0294128
feat: add nightly releases via GoReleaser and Homebrew tap
gtrrz-victor 5765f88
Update .github/workflows/nightly.yml
gtrrz-victor fced2cc
Update .github/workflows/nightly.yml
gtrrz-victor f70bda9
refine nightly release config
gtrrz-victor 60039ba
bump nightly tag to next patch version
gtrrz-victor 2eaf2c1
extract nightly tag logic into script
gtrrz-victor d22d8e2
use skip_upload: auto for stable cask and scoop
gtrrz-victor 0fbd431
add nightly version check channel
gtrrz-victor 40f186c
fix: gofmt formatting in versioncheck
gtrrz-victor 9bd11d9
Merge branch 'main' into gtrrz-victor/release-nightlys
gtrrz-victor cc1b15f
fix: use GitHub App token for nightly tag push
gtrrz-victor 3115857
refactor: split release notes into separate stable and nightly steps
gtrrz-victor 0978431
add mise release task for stable + nightly tags
gtrrz-victor da8c72e
fix: address PR review findings
gtrrz-victor 79f653a
fix: add t.Parallel() to TestIsNightly subtests
gtrrz-victor 470b22f
Update cmd/entire/cli/versioncheck/versioncheck.go
gtrrz-victor 55f48fc
add version to User-Agent in nightly version check
gtrrz-victor c8cc69d
use YYYYMMDDhhmm timestamp for nightly tags and remove stale nolint d…
gtrrz-victor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| name: Nightly Release | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: "0 6 * * *" # 06:00 UTC daily | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| concurrency: | ||
| group: nightly-release-${{ github.ref }} | ||
| cancel-in-progress: true | ||
| jobs: | ||
| create-nightly-tag: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Generate token | ||
| id: app-token | ||
| uses: actions/create-github-app-token@v3.0.0 | ||
| with: | ||
| app-id: ${{ secrets.HOMEBREW_TAP_APP_ID }} | ||
| private-key: ${{ secrets.HOMEBREW_TAP_APP_PRIVATE_KEY }} | ||
| owner: ${{ github.repository_owner }} | ||
| repositories: cli | ||
|
|
||
| - uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
| token: ${{ steps.app-token.outputs.token }} | ||
|
|
||
| - name: Create nightly tag | ||
| run: | | ||
| TAG=$(scripts/create-nightly-tag.sh) | ||
| EXIT_CODE=$? | ||
| if [ "$EXIT_CODE" -eq 2 ]; then | ||
| echo "Skipping — no new nightly needed." | ||
| exit 0 | ||
| elif [ "$EXIT_CODE" -ne 0 ] || [ -z "$TAG" ]; then | ||
| echo "::error::Failed to generate nightly tag" | ||
| exit 1 | ||
| fi | ||
| git tag "$TAG" | ||
| git push origin "$TAG" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| #!/bin/sh | ||
| #MISE description="Create stable + nightly release tags and push them (usage: mise run release vX.X.X)" | ||
| set -eu | ||
|
|
||
| VERSION="${1:-}" | ||
| if [ -z "$VERSION" ]; then | ||
| echo "Usage: mise run release vX.X.X" | ||
| exit 1 | ||
| fi | ||
|
|
||
| # Ensure version starts with v | ||
| case "$VERSION" in | ||
| v*) ;; | ||
| *) VERSION="v${VERSION}" ;; | ||
| esac | ||
|
|
||
| # Validate semver format (vMAJOR.MINOR.PATCH) | ||
| if ! echo "$VERSION" | grep -qE '^v[0-9]+\.[0-9]+\.[0-9]+$'; then | ||
| echo "Error: invalid version format '${VERSION}', expected vMAJOR.MINOR.PATCH" | ||
| exit 1 | ||
| fi | ||
|
|
||
| # Ensure working tree is clean | ||
| if [ -n "$(git status --porcelain)" ]; then | ||
| echo "Error: working tree is not clean, commit or stash changes first" | ||
| exit 1 | ||
| fi | ||
|
|
||
| # Create stable tag first so the nightly script can find it | ||
| git tag "$VERSION" | ||
| echo "Created tag ${VERSION}" | ||
|
|
||
| # Generate and create nightly tag if possible | ||
| NIGHTLY_TAG=$(scripts/create-nightly-tag.sh) || true | ||
|
|
||
| git push origin "$VERSION" | ||
| echo "Pushed tag ${VERSION}" | ||
|
|
||
| if [ -n "$NIGHTLY_TAG" ]; then | ||
| git tag "$NIGHTLY_TAG" | ||
| echo "Created tag ${NIGHTLY_TAG}" | ||
| git push origin "$NIGHTLY_TAG" | ||
| fi | ||
gtrrz-victor marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| echo "" | ||
| echo "Done. Release workflows will start automatically." | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.