-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.goreleaser.yaml
75 lines (67 loc) · 1.6 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
release:
prerelease: auto
draft: false
env:
- CGO_ENABLED=0
builds:
- id: linux-build
dir: ./cmd/binny
binary: binny
goos:
- linux
goarch:
- amd64
- arm64
# set the modified timestamp on the output binary to the git timestamp to ensure a reproducible build
mod_timestamp: &build-timestamp '{{ .CommitTimestamp }}'
ldflags: &build-ldflags |
-w
-s
-extldflags '-static'
-X main.version={{.Version}}
-X main.gitCommit={{.Commit}}
-X main.buildDate={{.Date}}
-X main.gitDescription={{.Summary}}
- id: darwin-build
dir: ./cmd/binny
binary: binny
goos:
- darwin
goarch:
- amd64
- arm64
mod_timestamp: *build-timestamp
ldflags: *build-ldflags
hooks:
post:
- cmd: .tool/quill sign-and-notarize "{{ .Path }}" --dry-run={{ .IsSnapshot }} --ad-hoc={{ .IsSnapshot }} -vv
env:
- QUILL_LOG_FILE=/tmp/quill-{{ .Target }}.log
# not supported yet
# - id: windows-build
# dir: ./cmd/binny
# binary: binny
# goos:
# - windows
# goarch:
# - amd64
# mod_timestamp: *build-timestamp
# ldflags: *build-ldflags
archives:
- id: linux-archives
builds:
- linux-build
- id: darwin-archives
builds:
- darwin-build
# not supported yet
# - id: windows-archives
# format: zip
# builds:
# - windows-build
sboms:
- artifacts: binary
documents:
- "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}.spdx.json"
cmd: ../.tool/syft
args: ["$artifact", "--file", "$document", "--output", "spdx-json"]