-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.goreleaser.yml
171 lines (154 loc) · 3.46 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
167
168
169
170
# Copyright (c) Volvo Car Corporation
# SPDX-License-Identifier: Apache-2.0
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com
project_name: lingon
dist: bin
before:
hooks:
- go mod tidy
gomod:
proxy: true
env:
- GOPROXY=https://proxy.golang.org,direct
builds:
#
# EXPLODE
#
# check results of yaml anchors
# with https://yaml-online-parser.appspot.com/
- &buildstep
id: explode-linux
binary: explode
main: ./cmd/explode/cli.go
goos:
- linux
goarch:
- amd64
- arm64
# ensures mod timestamp to be the commit timestamp
mod_timestamp: "{{ .CommitTimestamp }}"
env:
- CGO_ENABLED=0
- GO111MODULE=on
- GOPROXY=https://proxy.golang.org,direct
flags:
- -trimpath
ldflags:
- >
-s -w
-extldflags "-static"
-X main.version={{ .Version }}
-X main.commit={{ .Commit }}
-X main.date={{ .Date }}
-X main.builtBy=goreleaser
- <<: *buildstep
id: explode-macos
binary: explode
goos:
- darwin
goarch:
- amd64
- arm64
#
# KYGO
#
- <<: *buildstep
id: kygo-linux
binary: kygo
main: ./cmd/kygo/cli.go
goos:
- linux
goarch:
- amd64
- arm64
- <<: *buildstep
id: kygo-macos
binary: kygo
main: ./cmd/kygo/cli.go
goos:
- darwin
goarch:
- amd64
- arm64
#
# TERRAGEN
#
- <<: *buildstep
id: terragen-linux
binary: terragen
main: ./cmd/terragen/cli.go
goos:
- linux
goarch:
- amd64
- arm64
- <<: *buildstep
id: terragen-macos
binary: terragen
main: ./cmd/terragen/cli.go
goos:
- darwin
goarch:
- amd64
- arm64
archives:
- id: explode
format: tar.gz
name_template: &artags "{{ .Binary }}_{{ .Os }}_{{ .Arch }}_{{ .ShortCommit }}"
builds:
- explode-linux
- explode-macos
- id: kygo
format: tar.gz
name_template: *artags
builds:
- kygo-linux
- kygo-macos
- id: terragen
format: tar.gz
name_template: *artags
builds:
- terragen-linux
- terragen-macos
- id: needed-for-homebrew
builds:
- explode-linux
- explode-macos
- kygo-linux
- kygo-macos
- terragen-linux
- terragen-macos
checksum:
name_template: "checksums.txt"
sboms:
- artifacts: archive
- id: source # Two different sbom configurations need two different IDs
artifacts: source
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
exclude:
- "^[Dd]ocs:"
- "^[Tt]est:"
- "^testdata:"
brews:
- name: lingon
ids:
- needed-for-homebrew
homepage: "https://github.com/golingon/lingon"
description: |
Lingon binaries:
- explode is a command line tool to organize kubernetes manifests according to their kind. (YAML to YAML)
- kygo is a command line tool to convert kubernetes YAML manifests to Go structs. (YAML to Go)
- terragen generates Go code for Terraform providers.
test: |
system "#{bin}/explode -v"
system "#{bin}/kygo -v"
system "#{bin}/terragen -v"
# The lines beneath this are called `modelines`. See `:help modeline`
# Feel free to remove those if you don't want/use them.
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj