Repository navigation
Expand file tree
/
Copy path.goreleaser.yaml
More file actions
287 lines (269 loc) · 8.08 KB
/
Copy path.goreleaser.yaml
File metadata and controls
287 lines (269 loc) · 8.08 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
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
version: 2
git:
ignore_tags:
- nightly
- ".*-nightly.*"
before:
hooks:
- go generate ./...
- sh -c 'cd web/frontend && CI=true pnpm install --frozen-lockfile && pnpm build:backend'
- sh -c 'V="{{ .Version }}"; V="${V#v}"; V="${V%%-*}"; [ -n "$V" ] || V=0.0.0; GOBIN="$(go env GOPATH)/bin"; mkdir -p "$GOBIN"; go install github.com/tc-hib/go-winres@v0.3.3 && "$GOBIN/go-winres" make --in web/backend/winres/winres.json --out web/backend/rsrc --product-version="$V" --file-version="$V"'
- sh -c 'if [ "${INCLUDE_ANDROID_BUNDLE:-}" = "true" ]; then make build-android-bundle; fi'
builds:
- id: rhizome
env:
- CGO_ENABLED=0
tags:
- goolm
- stdjson
ldflags:
- -s -w
- -X github.com/stpinkie/rhizome/pkg/config.Version={{ .Version }}
- -X github.com/stpinkie/rhizome/pkg/config.GitCommit={{ .ShortCommit }}
- -X github.com/stpinkie/rhizome/pkg/config.BuildTime={{ .Date }}
- -X github.com/stpinkie/rhizome/pkg/config.GoVersion={{ with index .Env "GOVERSION" }}{{ . }}{{ else }}unknown{{ end }}
goos:
- linux
- windows
- darwin
- freebsd
- netbsd
goarch:
- amd64
- 386
- arm64
- riscv64
- loong64
- arm
- s390x
- mipsle
goarm:
- "6"
- "7"
gomips:
- softfloat
main: ./cmd/rhizome
ignore:
- goos: windows
goarch: arm
- goos: netbsd
goarch: arm
- id: rhizome-launcher
binary: rhizome-launcher
env:
- CGO_ENABLED=0
tags:
- goolm
- stdjson
ldflags:
- -s -w
- -X github.com/stpinkie/rhizome/pkg/config.Version={{ .Version }}
- -X github.com/stpinkie/rhizome/pkg/config.GitCommit={{ .ShortCommit }}
- -X github.com/stpinkie/rhizome/pkg/config.BuildTime={{ .Date }}
- -X github.com/stpinkie/rhizome/pkg/config.GoVersion={{ with index .Env "GOVERSION" }}{{ . }}{{ else }}unknown{{ end }}
goos:
- linux
- windows
- darwin
- freebsd
- netbsd
goarch:
- amd64
- 386
- arm64
- riscv64
- loong64
- arm
- s390x
- mipsle
goarm:
- "6"
- "7"
gomips:
- softfloat
main: ./web/backend
ignore:
- goos: windows
goarch: arm
- goos: netbsd
goarch: arm
- id: rhizome-android
binary: rhizome
env:
- CGO_ENABLED=0
tags:
- goolm
- stdjson
ldflags:
- -s -w
- -checklinkname=0
- -X github.com/stpinkie/rhizome/pkg/config.Version={{ .Version }}
- -X github.com/stpinkie/rhizome/pkg/config.GitCommit={{ .ShortCommit }}
- -X github.com/stpinkie/rhizome/pkg/config.BuildTime={{ .Date }}
- -X github.com/stpinkie/rhizome/pkg/config.GoVersion={{ with index .Env "GOVERSION" }}{{ . }}{{ else }}unknown{{ end }}
goos:
- android
goarch:
- arm64
main: ./cmd/rhizome
# rhizome-market companion module (v0.14.0 Track 100): a separate build +
# archive so it never lands in the base archives; checksums.txt covers it
# for catalog digest pinning.
- id: rhizome-market
binary: rhizome-market
env:
- CGO_ENABLED=0
tags:
- goolm
- stdjson
ldflags:
- -s -w
- -X github.com/stpinkie/rhizome/pkg/config.Version={{ .Version }}
- -X github.com/stpinkie/rhizome/pkg/config.GitCommit={{ .ShortCommit }}
- -X github.com/stpinkie/rhizome/pkg/config.BuildTime={{ .Date }}
- -X github.com/stpinkie/rhizome/pkg/config.GoVersion={{ with index .Env "GOVERSION" }}{{ . }}{{ else }}unknown{{ end }}
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
main: ./cmd/rhizome-market
# Docker images default to stpinkie/rhizome on Docker Hub.
# Override DOCKERHUB_IMAGE_NAME to publish from a fork.
dockers_v2:
- id: rhizome
dockerfile: docker/Dockerfile.goreleaser
extra_files:
- docker/entrypoint.sh
ids:
- rhizome
images:
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY_OWNER }}/rhizome"
- 'docker.io/{{ if isEnvSet "DOCKERHUB_IMAGE_NAME" }}{{ .Env.DOCKERHUB_IMAGE_NAME }}{{ else }}stpinkie/rhizome{{ end }}'
tags:
- '{{ if isEnvSet "NIGHTLY_BUILD" }}nightly{{ else }}{{ .Tag }}{{ end }}'
- '{{ if isEnvSet "NIGHTLY_BUILD" }}nightly{{ else }}latest{{ end }}'
platforms:
- linux/amd64
- linux/arm64
- linux/riscv64
- id: rhizome-launcher
dockerfile: docker/Dockerfile.goreleaser.launcher
ids:
- rhizome
- rhizome-launcher
images:
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY_OWNER }}/rhizome"
- 'docker.io/{{ if isEnvSet "DOCKERHUB_IMAGE_NAME" }}{{ .Env.DOCKERHUB_IMAGE_NAME }}{{ else }}stpinkie/rhizome{{ end }}'
tags:
- '{{ if isEnvSet "NIGHTLY_BUILD" }}nightly-launcher{{ else }}{{ .Tag }}-launcher{{ end }}'
- '{{ if isEnvSet "NIGHTLY_BUILD" }}nightly-launcher{{ else }}launcher{{ end }}'
platforms:
- linux/amd64
- linux/arm64
- linux/riscv64
notarize:
macos:
- enabled: '{{ isEnvSet "MACOS_SIGN_P12" }}'
ids:
- rhizome
- rhizome-launcher
sign:
certificate: "{{.Env.MACOS_SIGN_P12}}"
password: "{{.Env.MACOS_SIGN_PASSWORD}}"
notarize:
issuer_id: "{{.Env.MACOS_NOTARY_ISSUER_ID}}"
key_id: "{{.Env.MACOS_NOTARY_KEY_ID}}"
key: "{{.Env.MACOS_NOTARY_KEY}}"
wait: true
timeout: 20m
archives:
- id: rhizome
formats: [tar.gz]
ids:
- rhizome
- rhizome-launcher
# this name template makes the OS and Arch compatible with the results of `uname`.
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
# use zip for windows archives
format_overrides:
- goos: windows
formats: [zip]
# The android build produces a single binary while desktop archives carry
# both rhizome and rhizome-launcher; keep it in its own archive so binary
# counts are consistent per archive (GoReleaser v2 validation).
- id: rhizome-android
formats: [tar.gz]
ids:
- rhizome-android
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- .Arch }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
# rhizome-market ships as rhizome-market_{goos}_{goarch}.{tar.gz|zip} —
# the shape the catalog's asset_template expects — in its own archive id.
- id: rhizome-market
formats: [tar.gz]
ids:
- rhizome-market
name_template: "rhizome-market_{{ .Os }}_{{ .Arch }}"
format_overrides:
- goos: windows
formats: [zip]
nfpms:
- id: rhizome
ids:
- rhizome
- rhizome-launcher
package_name: rhizome
file_name_template: >-
{{ .PackageName }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "arm64" }}aarch64
{{- else if eq .Arch "arm" }}armv{{ .Arm }}
{{- else }}{{ .Arch }}{{ end }}
vendor: rhizome
homepage: https://github.com/{{ .Env.GITHUB_REPOSITORY_OWNER }}/rhizome
maintainer: rhizome contributors
description: rhizome - a tool for managing and running tasks
license: MIT
formats:
- rpm
- deb
bindir: /usr/bin
contents:
- src: web/rhizome-launcher.desktop
dst: /usr/share/applications/rhizome-launcher.desktop
- src: web/rhizome-launcher.png
dst: /usr/share/icons/hicolor/512x512/apps/rhizome-launcher.png
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
# upx:
# - enabled: true
# compress: best
# lzma: true
release:
disable: '{{ isEnvSet "NIGHTLY_BUILD" }}'
# Semver-aware: tags with a pre-release suffix (v1.2.3-rc1) publish as
# pre-release without needing the workflow_dispatch flag.
prerelease: auto
extra_files:
- glob: ./build/rhizome-android-universal.zip
footer: >-
---
Released by [GoReleaser](https://github.com/goreleaser/goreleaser).