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 }}
35 {{- else if eq .Os "linux" }}CGO_LDFLAGS=-L{{ .Env.PCSC_DIR }}/lib/{{ .Arch }}
36 {{- end }}
37 - >-
38 {{- if eq .Os "darwin" }}
39 {{- if eq .Arch "amd64"}}CC=clang -arch x86_64 -isysroot {{ .Env.SDK_PATH }}{{- end }}
40 {{- if eq .Arch "arm64"}}CC=clang -arch arm64 -isysroot {{ .Env.SDK_PATH }}{{- end }}
41 {{- else if eq .Os "linux" }}
42 {{- if eq .Arch "amd64" }}CC=zig cc -target x86_64-linux-musl -lc{{- end }}
43 {{- if eq .Arch "arm64"}}CC=zig cc -target aarch64-linux-musl -lc{{- end }}
44 {{- else if eq .Os "windows" }}
45 {{- if eq .Arch "amd64" }}CC=zig cc -target x86_64-windows-gnu -lc{{- end }}
46 {{- if eq .Arch "arm64"}}CC=zig cc -target aarch64-windows-gnu -lc{{- end }}
47 {{- end }}
48
49archives:
50 - formats: [tar.gz]
51 name_template: "{{ .ProjectName }}_nightly_{{ .Os }}_{{ .Arch }}"
52 format_overrides:
53 - goos: windows
54 formats: ["zip"]
55 files:
56 - LICENSE
57 - README.md
58
59checksum:
60 name_template: "checksums.txt"
61
62snapshot:
63 version_template: "nightly-{{ .ShortCommit }}"