-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy path.goreleaser.yaml
More file actions
154 lines (141 loc) · 3.82 KB
/
Copy path.goreleaser.yaml
File metadata and controls
154 lines (141 loc) · 3.82 KB
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
version: 2
project_name: compute-blade-agent
before:
hooks:
- go mod tidy
builds:
- id: agent
env: &env
- CGO_ENABLED=0
goos: &goos
- linux
goarch: &goarch
- arm64
binary: compute-blade-agent
dir: ./cmd/agent/
mod_timestamp: "{{ .CommitTimestamp }}"
ldflags: &ldflags
- -X=main.Version={{.Version}}
- -X=main.Commit={{.Commit}}
- -X=main.Date={{ .CommitTimestamp }}
- id: bladectl
env: *env
goos: *goos
goarch: *goarch
binary: bladectl
dir: ./cmd/bladectl/
mod_timestamp: "{{ .CommitTimestamp }}"
ldflags: *ldflags
- id: bladectl_other
env: *env
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
ignore:
- goos: linux
goarch: arm64
binary: bladectl
dir: ./cmd/bladectl/
mod_timestamp: "{{ .CommitTimestamp }}"
ldflags: *ldflags
# Docker image including both agent and bladectl
dockers:
- id: oci-bundle
dockerfile: Dockerfile
goos: linux
goarch: arm64
ids:
- agent
- bladectl
image_templates:
- ghcr.io/compute-blade-community/compute-blade-agent:latest
- ghcr.io/compute-blade-community/compute-blade-agent:{{ .Tag }}
- ghcr.io/compute-blade-community/compute-blade-agent:v{{ .Major }}
build_flag_templates:
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--platform=linux/arm64"
# Sign docker-image with cosign (keyless)
docker_signs:
- id: oci-bundle-sign
artifacts: all
args:
- "sign"
- --oidc-issuer=https://token.actions.githubusercontent.com
- --upload=false
- "${artifact}"
- --yes
ids:
- oci-bundle
# Sign everything else
signs:
- cmd: cosign
signature: "${artifact}.sig"
certificate: "${artifact}.pem"
args:
- sign-blob
- --oidc-issuer=https://token.actions.githubusercontent.com
- "--output-certificate=${certificate}"
- "--output-signature=${signature}"
- "${artifact}"
artifacts: all
# Regular OS packages (for now only systemd based OSes)
nfpms:
- id: compute-blade-agent
package_name: compute-blade-agent
ids:
- bladectl
- agent
maintainer: Matthias Riegler <me@xvzf.tech>
description: compute-blade Agent
homepage: https://github.com/compute-blade-community/compute-blade-agent
vendor: Uptime Industries Inc.
license: Apache 2.0
formats:
- deb
- rpm
- archlinux
bindir: /usr/bin
contents:
- src: ./hack/systemd/compute-blade-agent.service
dst: /etc/systemd/system/compute-blade-agent.service
- src: ./cmd/agent/default-config.yaml
dst: /etc/compute-blade-agent/config.yaml
type: config
- src: ./fanunit.uf2
dst: /usr/share/compute-blade-agent/fanunit.uf2
- id: bladectl
package_name: bladectl
ids:
- bladectl
- bladectl_other
maintainer: Matthias Riegler <me@xvzf.tech>
description: bladectl
homepage: https://github.com/compute-blade-community/compute-blade-agent
vendor: Uptime Industries Inc.
license: Apache 2.0
formats:
- deb
- rpm
- archlinux
bindir: /usr/bin
archives:
- id: compute-blade-agent
ids:
- agent
- bladectl
name_template: 'compute-blade-agent_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
- id: bladectl
ids:
- bladectl
- bladectl_other
name_template: 'bladectl_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
release:
extra_files:
- glob: ./fanunit.uf2