forked from authzed/zed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yml
166 lines (158 loc) · 4.81 KB
/
.goreleaser.yml
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
---
builds:
- id: "linux-amd64-gnu"
goos: ["linux"]
goarch: ["amd64"]
env: ["CC=x86_64-unknown-linux-gnu-gcc", "CGO_ENABLED=1"]
main: &main "./cmd/zed"
binary: &binary "zed"
mod_timestamp: &mod_timestamp "{{ .CommitTimestamp }}"
flags: &flags ["-trimpath"]
asmflags: &asmflags ["all=-trimpath={{ .Env.GITHUB_WORKSPACE }}"]
gcflags: &gcflags ["all=-trimpath={{ .Env.GITHUB_WORKSPACE }}"]
ldflags: &ldflags
- "-s -w"
- "-X {{ .ModulePath }}/internal/version.Version={{ .Version }}"
- id: "linux-amd64-musl"
goos: ["linux"]
goarch: ["amd64"]
env: ["CC=x86_64-unknown-linux-musl-gcc", "CGO_ENABLED=1"]
main: *main
binary: *binary
mod_timestamp: *mod_timestamp
flags: *flags
asmflags: *asmflags
gcflags: *gcflags
ldflags: *ldflags
- id: "linux-arm64-gnu"
goos: ["linux"]
goarch: ["arm64"]
env: ["CC=aarch64-unknown-linux-gnu-gcc", "CGO_ENABLED=1"]
main: *main
binary: *binary
mod_timestamp: *mod_timestamp
flags: *flags
asmflags: *asmflags
gcflags: *gcflags
ldflags: *ldflags
- id: "linux-arm64-musl"
goos: ["linux"]
goarch: ["arm64"]
env: ["CC=aarch64-unknown-linux-musl-gcc", "CGO_ENABLED=1"]
main: *main
binary: *binary
mod_timestamp: *mod_timestamp
flags: *flags
asmflags: *asmflags
gcflags: *gcflags
ldflags: *ldflags
- id: "windows-amd64"
goos: ["windows"]
goarch: ["amd64"]
env: ["CC=x86_64-w64-mingw32-gcc", "CGO_ENABLED=1"]
main: *main
binary: *binary
mod_timestamp: *mod_timestamp
flags: *flags
asmflags: *asmflags
gcflags: *gcflags
ldflags: *ldflags
- id: "darwin-amd64"
goos: ["darwin"]
goarch: ["amd64"]
env: ["CGO_ENABLED=1"]
main: *main
binary: *binary
mod_timestamp: *mod_timestamp
flags: *flags
asmflags: *asmflags
gcflags: *gcflags
ldflags: *ldflags
- id: "darwin-arm64"
goos: ["darwin"]
goarch: ["arm64"]
env: ["CGO_ENABLED=1"]
main: *main
binary: *binary
mod_timestamp: *mod_timestamp
flags: *flags
asmflags: *asmflags
gcflags: *gcflags
ldflags: *ldflags
archives:
- id: "gnu"
builds:
- "linux-amd64-gnu"
- "linux-arm64-gnu"
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}_gnu"
- id: "musl"
builds:
- "linux-amd64-musl"
- "linux-arm64-musl"
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}_musl"
- id: "other"
builds:
- "darwin-amd64"
- "darwin-arm64"
- "windows-amd64"
nfpms:
- id: "gnu"
vendor: &vendor "authzed inc."
homepage: &homepage "https://authzed.com/"
maintainer: &maintainer "authzed <[email protected]>"
description: &description "manage Authzed from your command line."
license: &license "Apache 2.0"
epoch: &epoch "0"
builds: ["linux-amd64-gnu", "linux-arm64-gnu"]
formats: ["deb", "rpm"]
- id: "musl"
vendor: *vendor
homepage: *homepage
maintainer: *maintainer
description: *description
license: *license
epoch: *epoch
builds: ["linux-amd64-musl", "linux-arm64-musl"]
formats: ["apk"]
brews:
- tap:
owner: "authzed"
name: "homebrew-tap"
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
ids: ["gnu", "other"]
url_template: "https://github.com/authzed/zed/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
download_strategy: "CurlDownloadStrategy"
commit_author:
name: "authzedbot"
email: "[email protected]"
commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}"
homepage: "https://authzed.com/"
description: "manage Authzed from your command line."
license: "Apache-2.0"
folder: "Formula"
custom_block: |
head "https://github.com/authzed/zed.git", :branch => "main"
dependencies:
- name: "go"
type: "build"
test: |
system "#{bin}/zed version"
install: |
if !File.exists? "zed"
system "go build --ldflags \"-s -w -X github.com/authzed/zed/internal/version.Version=$(git describe --always --abbrev=7 --dirty)\" ./cmd/zed"
end
bin.install "zed"
(bash_completion/"zed").write Utils.safe_popen_read("#{bin}/zed", "completion", "bash")
(zsh_completion/"_zed").write Utils.safe_popen_read("#{bin}/zed", "completion", "zsh")
(fish_completion/"zed.fish").write Utils.safe_popen_read("#{bin}/zed", "completion", "fish")
checksum:
name_template: "checksums.txt"
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: "asc"
release:
prerelease: "auto"
footer: |
## Docker Images
This release is available at `quay.io/authzed/zed:{{ .Version }}`