-
Notifications
You must be signed in to change notification settings - Fork 17
/
.goreleaser.yaml
61 lines (53 loc) · 1.45 KB
/
.goreleaser.yaml
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
project_name: harp
before:
hooks:
- go mod tidy
- go mod vendor
gomod:
proxy: true
builds:
- id: harp
main: './cmd/harp'
env:
- CGO_ENABLED=0
mod_timestamp: '{{ .CommitTimestamp }}'
flags:
- -trimpath
ldflags:
- '-s'
- '-w'
- '-X github.com/elastic/harp/build/version.Name=harp'
- '-X github.com/elastic/harp/build/version.AppName=github.com/elastic/harp/cmd/harp'
- '-X github.com/elastic/harp/build/version.Version={{.Version}}'
- '-X github.com/elastic/harp/build/version.Commit={{.CommitDate}}'
- '-X github.com/elastic/harp/build/version.Branch={{.Branch}}'
- '-X github.com/elastic/harp/build/version.BuildDate={{.Date}}'
- '-X github.com/elastic/harp/build/version.BuildTags=defaults'
targets:
- darwin_amd64
- darwin_arm64
- linux_amd64
- linux_arm
- linux_arm64
- windows_amd64
- windows_arm
- windows_arm64
binary: 'harp-{{replace .Target "_" "-"}}'
hooks:
post:
- cmd: cyclonedx-gomod app -main ./cmd/harp -licenses -packages -json -output "dist/harp-{{replace .Target "_" "-"}}.sbom.json"
env:
- GOARCH={{ .Arch }}
- GOOS={{ .Os }}
no_unique_dist_dir: true
archives:
- format: binary
name_template: '{{ .Binary }}'
snapshot:
name_template: "{{.Tag}}-next"
checksum:
name_template: 'checksums.txt'
release:
disable: true
changelog:
skip: true