-
Notifications
You must be signed in to change notification settings - Fork 1
/
.goreleaser.yml
66 lines (58 loc) · 1.36 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
env:
- CGO_ENABLED=0
- API_VERSION={{ if index .Env "API_VERSION" }}{{ .Env.API_VERSION }}{{ else }}x5.0{{ end }}
before:
hooks:
- make
builds:
-
mod_timestamp: '{{ .CommitTimestamp }}'
flags:
- -trimpath
ldflags:
- '-s -w'
binary: '{{ .ProjectName }}_v{{ .Version }}_{{ .Env.API_VERSION }}_{{ .Os }}_{{ .Arch }}'
goos:
- netbsd
- solaris
- openbsd
- freebsd
- windows
- linux
- darwin
goarch:
- amd64
- '386'
- arm
- arm64
ignore:
- goos: openbsd
goarch: arm64
- goos: darwin
goarch: '386'
snapshot:
name_template: "{{ if eq .Summary .Tag }}{{ .Version }}{{ else }}{{ incpatch .Version }}-dev{{ end }}"
# {{ incpatch .Version }}-dev-{{ .Tag }}
archives:
- format: zip
files:
- none*
name_template: '{{ .ProjectName }}_v{{ .Version }}_{{ .Env.API_VERSION }}_{{ .Os }}_{{ .Arch }}'
checksum:
name_template: '{{ .ProjectName }}_v{{ .Version }}_SHA256SUMS'
algorithm: sha256
signs:
- cmd: cosign
env:
- COSIGN_EXPERIMENTAL=1
certificate: '${artifact}.pem'
args:
- sign-blob
- '--output-certificate=${certificate}'
- '--output-signature=${signature}'
- '${artifact}'
- "--yes" # needed on cosign 2.0.0+
artifacts: checksum
output: true
changelog:
use: github-native