-
Notifications
You must be signed in to change notification settings - Fork 21
/
.goreleaser.yml
114 lines (106 loc) · 3.01 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
---
version: 2
before:
hooks:
- go mod download
- go mod tidy
# NOTE(jkoelker) the changelog is managed by `release-please`
changelog:
disable: true
builds:
- main: ./cmd/konvoy-image/main.go
id: konvoy-image
binary: konvoy-image
mod_timestamp: "{{ .CommitTimestamp }}"
env:
- CGO_ENABLED=0
flags:
- -trimpath
ldflags:
- -s -w
- -X {{ .ModulePath }}/pkg/version.version=v{{trimprefix .Version "v"}}
- -X {{ .ModulePath }}/pkg/version.major={{ .Major }}
- -X {{ .ModulePath }}/pkg/version.minor={{ .Minor }}
- -X {{ .ModulePath }}/pkg/version.patch={{ .Patch }}
- -X {{ .ModulePath }}/pkg/version.revision={{ .FullCommit }}
- -X {{ .ModulePath }}/pkg/version.commitDate={{ .CommitDate }}
- -X {{ .ModulePath }}/pkg/version.branch={{ .Branch }}
- -X {{ .ModulePath }}/pkg/version.builtBy=goreleaser
goos:
- darwin
- linux
goarch:
- amd64
- arm64
- main: ./cmd/konvoy-image-wrapper/main.go
id: konvoy-image-wrapper
binary: konvoy-image
mod_timestamp: "{{ .CommitTimestamp }}"
env:
- CGO_ENABLED=0
flags:
- -trimpath
tags:
- EMBED_DOCKER_IMAGE
ldflags:
- -s -w
- -X {{ .ModulePath }}/pkg/version.version=v{{trimprefix .Version "v"}}
- -X {{ .ModulePath }}/pkg/version.major={{ .Major }}
- -X {{ .ModulePath }}/pkg/version.minor={{ .Minor }}
- -X {{ .ModulePath }}/pkg/version.patch={{ .Patch }}
- -X {{ .ModulePath }}/pkg/version.revision={{ .FullCommit }}
- -X {{ .ModulePath }}/pkg/version.commitDate={{ .CommitDate }}
- -X {{ .ModulePath }}/pkg/version.branch={{ .Branch }}
- -X {{ .ModulePath }}/pkg/version.builtBy=goreleaser
goos:
- darwin
- linux
goarch:
- amd64
- arm64
hooks:
pre:
- cmd: make cmd/konvoy-image-wrapper/image/konvoy-image-builder.tar.gz
output: true
env:
- REPO_REV=v{{trimprefix .Version "v"}}
- BUILDARCH={{.Arch }}
archives:
- id: konvoy-image-bundle
builds:
- konvoy-image-wrapper
name_template: "konvoy-image-bundle-v{{ .Version }}_{{ .Os }}_{{ .Arch }}"
format_overrides:
- goos: windows
format: zip
files:
- ansible
- bundles
- goss
- images
- overrides
- LICENSE
- README.md
checksum:
# override the name template to include the "v" prefix
name_template: '{{ .ProjectName }}_v{{trimprefix .Version "v"}}_checksums.txt'
release:
github:
prerelease: auto
ids:
- konvoy-image-bundle
notarize:
macos:
- enabled: '{{ isEnvSet "NOTARIZE_DARWIN_BINARY"}}'
ids:
- konvoy-image
- konvoy-image-wrapper
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