-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy path.goreleaser.yml
91 lines (88 loc) · 2.22 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
project_name: gce_metadata_server
release:
draft: true
github:
owner: salrashid123
name: gce_metadata_server
name_template: '{{.Tag}}'
extra_files:
scoop:
name: gce_metadata_server
commit_author:
name: sal
email: [email protected]
commit_msg_template: Scoop update for {{ .ProjectName }} version {{ .Tag }}
goamd64: v1
builds:
- id: gce_metadata_server
main: ./cmd
goos:
- linux
- darwin
goarch:
- amd64
- arm64
goamd64:
- v1
goarm:
- 7
env:
- CGO_ENABLED=0
binary: gce_metadata_server
builder: go
gobinary: go
command: build
ldflags:
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser
archives:
- id: archive
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
format: binary
files:
- LICENSE*
- README*
- dist/*.sig
snapshot:
name_template: '{{ .Version }}-SNAPSHOT-{{ .ShortCommit }}'
checksum:
name_template: '{{ .ProjectName }}_{{ .Version }}_checksums.txt'
algorithm: sha256
dist: dist
signs:
- cmd: gpg
id: gpg
artifacts: all
output: true
args:
- "--batch"
- "--local-user"
- "{{ .Env.GPG_FINGERPRINT }}" # "5D8EA7261718FE5728BA937C97341836616BF511" [email protected] https://keyserver.ubuntu.com/pks/lookup?search=5D8EA7261718FE5728BA937C97341836616BF511&fingerprint=on&op=index
- "--output"
- "${signature}"
- "--detach-sign"
- "${artifact}"
env_files:
github_token: ~/.config/goreleaser/github_token
source:
name_template: '{{ .ProjectName }}-{{ .Version }}'
format: tar.gz
gomod:
gobinary: go
github_urls:
download: https://github.com
# creates SBOMs of all archives and the source tarball using syft
# https://goreleaser.com/customization/sbom
sboms:
- id: default
cmd: syft
env:
- SYFT_FILE_METADATA_CATALOGER_ENABLED=true
args:
- $artifact
- --file
- $document
- --output
- spdx-json
documents:
- ${artifact}.spdx.sbom
artifacts: archive