-
Notifications
You must be signed in to change notification settings - Fork 8
/
.goreleaser.yml
120 lines (103 loc) · 2.59 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
version: 2
release:
prerelease: auto
changelog:
use: github-native
env:
- DOCKER_CLI_EXPERIMENTAL=enabled
gomod:
proxy: true
env:
- GOPROXY=https://proxy.golang.org,direct
- GOSUMDB=sum.golang.org
builds:
- id: darwin-builds
binary: scs-build
goos:
- darwin
goarch:
- amd64
- arm64
main: &build-main ./cmd/scs-build
mod_timestamp: &build-timestamp '{{ .CommitTimestamp }}'
env: &build-env
- CGO_ENABLED=0
flags: &build-flags '-trimpath'
ldflags: &build-ldflags |
-s
-w
-X main.version={{ .Version }}
-X main.date={{ .CommitDate }}
-X main.builtBy=goreleaser
-X main.commit={{ .FullCommit }}
- id: linux-builds
binary: scs-build
goos:
- linux
goarch:
- amd64
- arm64
main: *build-main
mod_timestamp: *build-timestamp
env: *build-env
flags: *build-flags
ldflags: *build-ldflags
- id: windows-builds
binary: scs-build
goos:
- windows
goarch:
- amd64
main: *build-main
mod_timestamp: *build-timestamp
env: *build-env
flags: *build-flags
ldflags: *build-ldflags
archives:
- id: darwin-archives
builds:
- darwin-builds
- id: linux-archives
builds:
- linux-builds
- id: windows-archives
format: zip
builds:
- windows-builds
dockers:
- image_templates:
- sylabsio/scs-build:{{ .Version }}-amd64
skip_push: auto
dockerfile: ./build/docker/scs-build/Dockerfile
use: buildx
goarch: amd64
build_flag_templates:
- "--platform=linux/amd64"
- image_templates:
- sylabsio/scs-build:{{ .Version }}-arm64v8
skip_push: auto
dockerfile: ./build/docker/scs-build/Dockerfile
use: buildx
goarch: arm64
build_flag_templates:
- "--platform=linux/arm64/v8"
docker_manifests:
- name_template: sylabsio/scs-build:latest
image_templates: &manifest-images
- sylabsio/scs-build:{{ .Version }}-amd64
- sylabsio/scs-build:{{ .Version }}-arm64v8
skip_push: auto
- name_template: sylabsio/scs-build:{{ .Major }}
image_templates: *manifest-images
skip_push: auto
- name_template: sylabsio/scs-build:{{ .Major }}.{{ .Minor }}
image_templates: *manifest-images
skip_push: auto
- name_template: sylabsio/scs-build:{{ .Major }}.{{ .Minor }}.{{ .Patch }}
image_templates: *manifest-images
skip_push: auto
sboms:
- documents:
- "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}.bom.cdx.json"
artifacts: binary
args: ["$artifact", "--file", "$document", "--output", "cyclonedx-json"]