Files
compute-blade-agent/.goreleaser.yaml
Matthias Riegler 790ea2089a fix: set goreleaser version to v2.x (#61)
* fix: set goreleaser version to v2.x

Signed-off-by: Matthias Riegler <me@xvzf.tech>

* fix: goreleaser issues

---------

Signed-off-by: Matthias Riegler <me@xvzf.tech>
Co-authored-by: Luke Mallon (Nalum) <luke@mallon.ie>
2025-06-06 14:26:53 +02:00

155 lines
3.8 KiB
YAML

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/uptime-industries/compute-blade-agent:latest
- ghcr.io/uptime-industries/compute-blade-agent:{{ .Tag }}
- ghcr.io/uptime-industries/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/github.com/uptime-industries/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/github.com/uptime-industries/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