-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yml
69 lines (63 loc) · 1.54 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
project_name: erborist
release:
prerelease: auto
draft: false
name_template: "erborist v{{.Version}}"
changelog:
use: github-native
sort: asc
before:
hooks:
- go mod tidy
builds:
- id: erborist
main: ./internal
binary: erborist
env:
- CGO_ENABLED=0
goos:
- windows
- darwin
- linux
goarch:
- amd64
- arm64
hooks:
post:
- npm run make:{{.Target}}
- bash .github/sign.sh --path {{.Path}} --dry-run {{.IsSnapshot}}
# Docs at https://goreleaser.com/customization/sign
signs:
- signature: "${artifact}.sig"
cmd: cosign
env:
- COSIGN_EXPERIMENTAL=1
certificate: '{{ trimsuffix (trimsuffix .Env.artifact ".zip") ".tar.gz" }}.pem'
args:
- sign-blob
- "--yes"
- '--oidc-issuer={{if index .Env "CI"}}https://token.actions.githubusercontent.com{{else}}https://oauth2.sigstore.dev/auth{{end}}'
- "--output-signature=${signature}"
- "--output-certificate=${certificate}"
- "${artifact}"
artifacts: all
output: true
archives:
-
<<: &archive_defaults
rlcp: true
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
format_overrides:
- goos: windows
format: zip