-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.goreleaser.yaml
More file actions
102 lines (94 loc) · 2.85 KB
/
Copy path.goreleaser.yaml
File metadata and controls
102 lines (94 loc) · 2.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
version: 2
project_name: joro
before:
hooks:
- go mod tidy
- sh -c "cd web && npm ci && npm run build"
- sh -c "command -v zig >/dev/null || { echo 'zig not found on PATH (brew install zig)'; exit 1; }"
builds:
- id: joro
main: .
binary: joro
env:
- CGO_ENABLED=1
# CC routing:
# - darwin: leave unset so Go uses Apple's clang, which natively
# handles cross-arch builds within the darwin family. Cross-
# compiling darwin via zig hits framework/SDK dependency-
# resolution issues (libobjc.tbd, etc.) that aren't worth
# working around when host clang already supports both archs.
# - linux/windows: route through scripts/cc.sh which wraps zig cc
# and works around several Go-vs-zig integration issues.
# The release build host therefore must be macOS with Xcode CLT
# installed (for darwin builds) AND zig on PATH (for linux/windows).
- >-
CC={{- if eq .Os "darwin" -}}
cc
{{- else -}}
{{ .Env.PWD }}/scripts/cc.sh
{{- if eq .Os "linux" }}
{{- if eq .Arch "amd64" }} x86_64-linux-gnu.2.17{{ end }}
{{- if eq .Arch "arm64" }} aarch64-linux-gnu.2.17{{ end }}
{{- end }}
{{- if eq .Os "windows" }}
{{- if eq .Arch "amd64" }} x86_64-windows-gnu{{ end }}
{{- if eq .Arch "arm64" }} aarch64-windows-gnu{{ end }}
{{- end }}
{{- end }}
# netgo + osusergo route DNS and os/user lookups through pure-Go
# implementations instead of libresolv / libc. Required for cross-compile
# via zig cc since zig's macOS sysroot doesn't ship libresolv. CGO stays
# on (-buildmode=plugin needs it); the tags only swap stdlib internals.
tags:
- netgo
- osusergo
flags:
- -trimpath
ldflags:
- -s -w
- -X main.version={{.Tag}}
- -X main.commit={{.ShortCommit}}
mod_timestamp: '{{ .CommitTimestamp }}'
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
# NOTE: this archive name template is duplicated in internal/update/update.go
# (binary-mode asset download). Keep them in sync.
archives:
- id: default
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
formats: [tar.gz]
format_overrides:
- goos: windows
formats: [zip]
files:
- LICENSE
- README.md
checksum:
name_template: "checksums.txt"
algorithm: sha256
snapshot:
version_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
- '^chore:'
groups:
- title: Features
regexp: "^(?i).*add.*$"
order: 0
- title: "Bug fixes"
regexp: "^(?i).*fix.*$"
order: 1
- title: Others
order: 999
release:
draft: true
replace_existing_draft: true