.goreleaser.nightly.yml

 1# GoReleaser configuration for nightly builds.
 2# This is a stripped-down version of .goreleaser.yml that skips
 3# Homebrew, WinGet, and Snapcraft publishing.
 4version: 2
 5
 6before:
 7  hooks:
 8    - go mod tidy
 9
10builds:
11  - id: matcha
12    main: .
13    goos:
14      - linux
15      - darwin
16      - windows
17    goarch:
18      - amd64
19      - arm64
20    flags:
21      - -trimpath
22    ldflags:
23      - -s -w -buildid= -X main.version=nightly-{{.ShortCommit}} -X main.commit={{.Commit}} -X main.date={{.Date}}
24    env:
25      - CGO_ENABLED=1
26      - >-
27        {{- if eq .Os "darwin" }}SDKROOT={{ .Env.SDK_PATH }}{{- end }}
28      - >-
29        {{- if eq .Os "darwin" }}MACOSX_DEPLOYMENT_TARGET=11.0{{- end }}
30      - >-
31        {{- if eq .Os "darwin" }}CGO_CFLAGS=-isysroot {{ .Env.SDK_PATH }} -mmacosx-version-min=11.0{{- end }}
32      - >-
33        {{- if eq .Os "darwin" }}CGO_LDFLAGS=-isysroot {{ .Env.SDK_PATH }}{{- end }}
34      - >-
35        {{- if eq .Os "darwin" }}
36          {{- if eq .Arch "amd64"}}CC=clang -arch x86_64 -isysroot {{ .Env.SDK_PATH }}{{- end }}
37          {{- if eq .Arch "arm64"}}CC=clang -arch arm64 -isysroot {{ .Env.SDK_PATH }}{{- end }}
38        {{- else if eq .Os "linux" }}
39          {{- if eq .Arch "amd64" }}CC=zig cc -target x86_64-linux-musl -lc{{- end }}
40          {{- if eq .Arch "arm64"}}CC=zig cc -target aarch64-linux-musl -lc{{- end }}
41        {{- else if eq .Os "windows" }}
42          {{- if eq .Arch "amd64" }}CC=zig cc -target x86_64-windows-gnu -lc{{- end }}
43          {{- if eq .Arch "arm64"}}CC=zig cc -target aarch64-windows-gnu -lc{{- end }}
44        {{- end }}
45
46archives:
47  - formats: [tar.gz]
48    name_template: "{{ .ProjectName }}_nightly_{{ .Os }}_{{ .Arch }}"
49    format_overrides:
50      - goos: windows
51        formats: ["zip"]
52    files:
53      - LICENSE
54      - README.md
55
56checksum:
57  name_template: "checksums.txt"
58
59changelog:
60  use: github-native
61
62release:
63  draft: false
64  prerelease: true
65  name_template: "Nightly Build ({{ .ShortCommit }})"
66  footer: |
67    ---
68    This is an automated nightly build from the latest `master` commit.
69    It may be unstable — use stable releases for production.