Skip to content

Enable nightly builds #1224

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Nightly Build

on:
schedule:
- cron: '0 6 * * *' # every day at 6 AM UTC
workflow_dispatch: # optional: allows manual runs

permissions:
contents: read

jobs:
goreleaser-nightly:
runs-on: ubuntu-latest

steps:
# Checkout the repository
- uses: actions/checkout@v4
with:
fetch-depth: 0

# Get go
- uses: actions/setup-go@v5
with:
go-version: '1.22'

# Execute goreleaser nightly run (see .goreleaser.yml nightly for details)
- uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser-pro
version: latest
args: release --clean --nightly
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
17 changes: 3 additions & 14 deletions src/.goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,18 +150,7 @@ announce:
enabled: true

nightly:
# Default: `{{ incpatch .Version }}-{{ .ShortCommit }}-nightly`.
# Templates: allowed.
# version_template: "{{ incpatch .Version }}-devel"

# Tag name to create if publish_release is enabled.
# tag_name: devel

# Whether to publish a release or not.
# Only works on GitHub.
tag_name: devel
publish_release: true

# Whether to delete previous pre-releases for the same `tag_name` when
# releasing.
# This allows you to keep a single pre-release.
# keep_single_release: true
keep_single_release: true
version_template: "{{ incpatch .Version }}-{{ .ShortCommit }}-nightly"
6 changes: 6 additions & 0 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,9 @@ push-images: images login ## Push all docker images
.PHONY: login
login: ## Login to docker
@docker login

.PHONY: nightly-local
nightly-local: ## Used for local testing of goreleaser nightly run
GORELEASER_ALLOW_DIRTY=true GORELEASER_LOG=debug \
goreleaser release --nightly --clean \
--skip=publish,announce,sign,notarize,validate
5 changes: 5 additions & 0 deletions src/bin/codesign.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#!/bin/sh
set -e

if [ "$SNAPSHOT" == "true" ]; then
echo "SNAPSHOT only build."
exit 0
fi

# Bail if we didn't get one (and only one) argument
if [ $# -ne 1 ]; then
echo "Usage: $0 <path to app to sign>"
Expand Down
5 changes: 5 additions & 0 deletions src/bin/notarize.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#!/bin/sh
set -e

if [ "$SNAPSHOT" == "true" ]; then
echo "SNAPSHOT only build."
exit 0
fi

# Bail if we didn't get one (and only one) argument
if [ $# -ne 1 ]; then
echo "Usage: $0 <path to app to notarize>"
Expand Down
Loading