.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.
 4# Used with --snapshot mode (no semver tag required).
 5version: 2
 6
 7before:
 8  hooks:
 9    - go mod tidy
10
11builds:
12  - id: matcha
13    main: .
14    goos:
15      - linux
16      - darwin
17      - windows
18    goarch:
19      - amd64
20      - arm64
21    flags:
22      - -trimpath
23    ldflags:
24      - -s -w -buildid= -X main.version=nightly-{{.ShortCommit}} -X main.commit={{.Commit}} -X main.date={{.Date}}
25    env:
26      - CGO_ENABLED=1
27      - >-
28        {{- if eq .Os "darwin" }}SDKROOT={{ .Env.SDK_PATH }}{{- end }}
29      - >-
30        {{- if eq .Os "darwin" }}MACOSX_DEPLOYMENT_TARGET=11.0{{- end }}
31      - >-
32        {{- if eq .Os "darwin" }}CGO_CFLAGS=-isysroot {{ .Env.SDK_PATH }} -mmacosx-version-min=11.0{{- end }}
33      - >-
34        {{- if eq .Os "darwin" }}CGO_LDFLAGS=-isysroot {{ .Env.SDK_PATH }}{{- end }}
35      - >-
36        {{- if eq .Os "darwin" }}
37          {{- if eq .Arch "amd64"}}CC=clang -arch x86_64 -isysroot {{ .Env.SDK_PATH }}{{- end }}
38          {{- if eq .Arch "arm64"}}CC=clang -arch arm64 -isysroot {{ .Env.SDK_PATH }}{{- end }}
39        {{- else if eq .Os "linux" }}
40          {{- if eq .Arch "amd64" }}CC=zig cc -target x86_64-linux-musl -lc{{- end }}
41          {{- if eq .Arch "arm64"}}CC=zig cc -target aarch64-linux-musl -lc{{- end }}
42        {{- else if eq .Os "windows" }}
43          {{- if eq .Arch "amd64" }}CC=zig cc -target x86_64-windows-gnu -lc{{- end }}
44          {{- if eq .Arch "arm64"}}CC=zig cc -target aarch64-windows-gnu -lc{{- end }}
45        {{- end }}
46
47archives:
48  - formats: [tar.gz]
49    name_template: "{{ .ProjectName }}_nightly_{{ .Os }}_{{ .Arch }}"
50    format_overrides:
51      - goos: windows
52        formats: ["zip"]
53    files:
54      - LICENSE
55      - README.md
56
57checksum:
58  name_template: "checksums.txt"
59
60snapshot:
61  version_template: "nightly-{{ .ShortCommit }}"