-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy path.goreleaser.yml
More file actions
81 lines (74 loc) · 1.76 KB
/
.goreleaser.yml
File metadata and controls
81 lines (74 loc) · 1.76 KB
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
version: 2
project_name: capture
builds:
- id: capture
main: ./cmd/capture
ldflags: &common_ldflags
- -s -w
- -extldflags "-static"
- -X "main.Version={{.Version}}"
- -X "main.Commit={{.Commit}}"
- -X "main.CommitDate={{.CommitDate}}"
- -X "main.CompiledAt={{.Date}}"
- -X "main.GitTag={{.Tag}}"
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
goarch:
# Support multiple cpu architectures
- amd64
- arm64
- arm
goarm:
- 6
- 7
ignore:
# Ignore the arm(arm32) architecture Windows
# Still supporting the arm64 architecture for Windows + Raspberry Pi combo and other development environments like arm64 laptops.
- goos: windows
goarch: arm
kos:
- id: capture
platforms:
- linux/amd64
- linux/arm64
tags:
- latest
- '{{.Tag}}'
main: ./cmd/capture
flags:
- -trimpath
ldflags: *common_ldflags
creation_time: "{{.CommitTimestamp}}"
env:
- CGO_ENABLED=0
bare: true
archives:
- formats: tar.gz
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
format_overrides:
- goos: windows
formats: zip
sboms:
- id: capture
cmd: syft
args: ["scan", "$artifact", "--output", "spdx-json=$document"]
artifacts: archive
documents:
- "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}.sbom.json"
checksum:
# Generate checksum files to confirm the integrity of the files.
# `sha256sum <file>`
name_template: 'checksums.txt'
algorithm: sha256
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
release:
draft: true