-
Notifications
You must be signed in to change notification settings - Fork 21
/
.goreleaser.yaml
94 lines (94 loc) · 2.88 KB
/
.goreleaser.yaml
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
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
project_name: frizbee
version: 2
# This section defines the build matrix.
builds:
- env:
- GO111MODULE=on
- CGO_ENABLED=0
flags:
- -trimpath
- -tags=netgo
ldflags:
- "-s -w"
- "-X main.Version={{ .Env.VERSION }}"
- "-X main.Commit={{ .Env.COMMIT }}"
- "-X main.CommitDate={{ .Env.COMMIT_DATE }}"
- "-X main.TreeState={{ .Env.TREE_STATE }}"
- "-X github.com/stacklok/frizbee/internal/cli.CLIVersion={{ .Env.VERSION }}"
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
main: ./main.go
# This section defines the release format.
archives:
- format: tar.gz # we can use binary, but it seems there's an issue where goreleaser skips the sboms
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
format_overrides:
- goos: windows
format: zip
# This section defines how to release to winget.
# winget:
# - name: frizbee
# publisher: stacklok
# license: Apache-2.0
# license_url: "https://github.com/stacklok/frizbee/blob/main/LICENSE"
# copyright: Stacklok, Inc.
# homepage: https://stacklok.com
# short_description: 'frizbee is a tool you may throw a tag at and it comes back with a checksum.'
# publisher_support_url: "https://github.com/stacklok/frizbee/issues/new/choose"
# package_identifier: "stacklok.frizbee"
# url_template: "https://github.com/stacklok/frizbee/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
# skip_upload: auto
# release_notes: "{{.Changelog}}"
# tags:
# - golang
# - cli
# commit_author:
# name: stacklokbot
# email: [email protected]
# goamd64: v1
# repository:
# owner: stacklok
# name: winget-pkgs
# branch: "frizbee-{{.Version}}"
# token: "{{ .Env.WINGET_GITHUB_TOKEN }}"
# pull_request:
# enabled: true
# draft: false
# base:
# owner: microsoft
# name: winget-pkgs
# branch: master
# This section defines whether we want to release the source code too.
source:
enabled: true
# This section defines how to generate the changelog
changelog:
sort: asc
use: github
# This section defines for which artifact types to generate SBOMs.
sboms:
- artifacts: archive
# This section defines the release policy.
release:
github:
owner: stacklok
name: frizbee
# This section defines how and which artifacts we want to sign for the release.
signs:
- cmd: cosign
args:
- "sign-blob"
- "--output-signature=${signature}"
- "--output-certificate=${certificate}"
- "${artifact}"
- "--yes" # needed on cosign 2.0.0+
artifacts: archive
output: true
certificate: '{{ trimsuffix (trimsuffix .Env.artifact ".zip") ".tar.gz" }}.pem'