-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.goreleaser.yml
103 lines (94 loc) · 2.69 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
project_name: lstn
release:
prerelease: auto
draft: false
name_template: "listen.dev CLI v{{.Version}}"
before:
hooks:
- go mod tidy
- go build -o make/make make/main.go
- make/make man
# FIXME: use make/make lstn
builds:
- <<: &build_defaults
binary: lstn
main: ./cmd/lstn
env:
- CGO_ENABLED=0
flags:
- -trimpath
ldflags:
- -w -s -X github.com/listendev/lstn/pkg/version.VersionPrefix=v{{.Version}}
id: macos
goos: [darwin]
goarch: [arm64, amd64]
- <<: *build_defaults
id: linux
goos: [linux]
goarch: ["386", arm, amd64, arm64]
# Docs at https://goreleaser.com/customization/changelog
changelog:
use: github-native
sort: asc
# Docs at https://goreleaser.com/customization/sign
signs:
- cmd: cosign
signature: "${artifact}.sig"
certificate: '{{ trimsuffix (trimsuffix .Env.artifact ".zip") ".tar.gz" }}.pem'
args: ["sign-blob", "--yes", "--output-signature=${signature}", "--output-certificate=${certificate}", "${artifact}"]
artifacts: all
output: true
env:
- COSIGN_EXPERIMENTAL=1
# Docs at https://goreleaser.com/customization/sbom
sboms:
- artifacts: binary
documents:
- >-
{{ .ProjectName }}_
{{- .Version }}_
{{- if eq .Os "darwin" }}macos{{ else }}{{ .Os }}{{ end }}_
{{- .Arch }}
{{- with .Arm }}v{{ . }}{{ end }}
{{- with .Mips }}_{{ . }}{{ end }}
{{- if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}.sbom
cmd: syft
args: ["$artifact", "--file", "${document}", "--output", "cyclonedx-json"]
# Docs at https://goreleaser.com/customization/archive
archives:
- id: nix
builds: [macos, linux]
<<: &archive_defaults
name_template: >-
{{ .ProjectName }}_
{{- .Version }}_
{{- if eq .Os "darwin" }}macos{{ else }}{{ .Os }}{{ end }}_
{{- .Arch }}
{{- with .Arm }}v{{ . }}{{ end }}
{{- with .Mips }}_{{ . }}{{ end }}
{{- if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}
wrap_in_directory: true
format: tar.gz
files:
- LICENSE
- ./share/man/man1/lstn*
# - id: win
# builds: [windows]
# <<: *archive_defaults
# wrap_in_directory: false
# format: zip
# files:
# - LICENSE
# # Docs at https://goreleaser.com/customization/nfpm
# nfpms:
# - license: Apache 2.0
# maintainer: Garnet Labs Inc.
# homepage: https://github.com/listendev/lstn
# description: |-
# Analyze the behavior of your dependencies using listen.dev.
# formats:
# - apk
# - deb
# - rpm
# - archlinux # Since GoReleaser v1.13
# # TODO > add the manpages to the packages with the "contents" property