-
Notifications
You must be signed in to change notification settings - Fork 17
/
.goreleaser.yml
79 lines (69 loc) · 1.86 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
project_name: github_actions_exporter
version: 2
env:
- DOCKER_CLI_EXPERIMENTAL=enabled
- COSIGN_YES=true
# Prevents parallel builds from stepping on each others toes downloading modules
before:
hooks:
- go mod tidy
- /bin/bash -c 'if [ -n "$(git --no-pager diff --exit-code go.mod go.sum)" ]; then exit 1; fi'
gomod:
proxy: true
snapshot:
version_template: '{{ .Tag }}-SNAPSHOT'
builds:
- id: binary
binary: github-actions-exporter
goos:
- linux
- darwin
goarch:
- amd64
- arm64
- arm
goarm:
- 7
ldflags: |
-X github.com/prometheus/common/version.Version={{.Version}}
-X github.com/prometheus/common/version.Revision={{.Commit}}
-X github.com/prometheus/common/version.Branch={{.Branch}}
-X github.com/prometheus/common/version.BuildUser=cpanato
-X github.com/prometheus/common/version.BuildDate={{.Date}}
archives:
- format: binary
allow_different_binary_count: true
checksum:
name_template: checksums.txt
signs:
- signature: "${artifact}.sig"
certificate: "${artifact}.pem"
cmd: cosign
args: ["sign-blob", "--output-signature", "${artifact}.sig", "--output-certificate", "${artifact}.pem", "${artifact}"]
artifacts: binary
- id: checksum-sign
signature: "${artifact}.sig"
certificate: "${artifact}.pem"
cmd: cosign
args: ["sign-blob", "--output-signature", "${artifact}.sig", "--output-certificate", "${artifact}.pem", "${artifact}"]
artifacts: checksum
kos:
- id: ko-image
main: .
base_image: cgr.dev/chainguard/static
repository: ghcr.io/cpanato
platforms:
- all
tags:
- 'v{{ .Version }}'
sbom: spdx
build: binary
bare: true
preserve_import_paths: false
base_import_paths: true
release:
github:
owner: cpanato
name: github_actions_exporter
draft: false
prerelease: allow