tart-guest-agent/.goreleaser.yml

87 lines
2.0 KiB
YAML

---
version: 2
project_name: tart-guest-agent
before:
hooks:
- go mod download
builds:
- id: darwin
main: cmd/main.go
flags: >-
-trimpath
ldflags: >-
-s -w
-X github.com/cirruslabs/tart-guest-agent/internal/version.Version={{.Version}}
-X github.com/cirruslabs/tart-guest-agent/internal/version.Commit={{.ShortCommit}}
env:
- CGO_ENABLED=1
targets:
- darwin_amd64
- darwin_arm64
- id: linux
main: cmd/main.go
flags: >-
-trimpath
ldflags: >-
-s -w
-X github.com/cirruslabs/tart-guest-agent/internal/version.Version={{.Version}}
-X github.com/cirruslabs/tart-guest-agent/internal/version.Commit={{.ShortCommit}}
env:
- CGO_ENABLED=0
targets:
- linux_amd64
- linux_arm64
universal_binaries:
- replace: true
ids:
- darwin
archives:
- name_template: "{{ .ProjectName }}-{{ .Os }}-{{ .Arch }}"
formats:
- tar.gz
release:
prerelease: auto
brews:
- name: "{{ .ProjectName }}"
directory: Formula
repository:
owner: openai
name: homebrew-tools
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
branch: "{{ .ProjectName }}-{{ .Version }}"
pull_request:
enabled: true
homepage: https://github.com/openai/tart-guest-agent
license: FSL-1.1-Apache-2.0
description: Guest agent for Tart VMs
skip_upload: auto
nfpms:
- package_name: "{{ .ProjectName }}"
vendor: Cirrus Labs, Inc.
homepage: https://github.com/cirruslabs/tart-guest-agent
maintainer: support@cirruslabs.org
description: Guest agent for Tart VMs
section: misc
formats:
- apk
- deb
- rpm
contents:
- src: packaging/tart-guest-agent.service
dst: /etc/systemd/system/tart-guest-agent.service
file_info:
mode: 0644
scripts:
postinstall: packaging/postinstall.sh
preremove: packaging/preremove.sh
postremove: packaging/postremove.sh