headscale/.goreleaser.yml

194 lines
5.6 KiB
YAML
Raw Normal View History

2022-01-30 08:56:28 +00:00
---
2021-06-14 09:17:23 +02:00
before:
hooks:
- go mod tidy -compat=1.22
- go mod vendor
2021-11-28 22:00:22 +00:00
release:
prerelease: auto
2021-06-14 09:17:23 +02:00
builds:
- id: headscale
main: ./cmd/headscale
2021-10-21 21:18:50 +02:00
mod_timestamp: "{{ .CommitTimestamp }}"
env:
- CGO_ENABLED=0
targets:
- darwin_amd64
- darwin_arm64
- freebsd_amd64
- linux_386
- linux_amd64
- linux_arm64
- linux_arm_5
- linux_arm_6
- linux_arm_7
flags:
- -mod=readonly
ldflags:
- -s -w -X github.com/juanfont/headscale/cmd/headscale/cli.Version=v{{.Version}}
2022-11-04 11:26:33 +01:00
tags:
- ts2019
2021-10-15 17:00:04 +02:00
2021-06-14 09:17:23 +02:00
archives:
- id: golang-cross
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
2021-07-12 17:04:28 +02:00
format: binary
2021-06-14 09:17:23 +02:00
source:
enabled: true
name_template: "{{ .ProjectName }}_{{ .Version }}"
format: tar.gz
files:
- "vendor/"
nfpms:
# Configure nFPM for .deb and .rpm releases
#
# See https://nfpm.goreleaser.com/configuration/
# and https://goreleaser.com/customization/nfpm/
#
# Useful tools for debugging .debs:
# List file contents: dpkg -c dist/headscale...deb
# Package metadata: dpkg --info dist/headscale....deb
#
- builds:
- headscale
package_name: headscale
priority: optional
vendor: headscale
maintainer: Kristoffer Dalby <kristoffer@dalby.cc>
homepage: https://github.com/juanfont/headscale
license: BSD
bindir: /usr/bin
formats:
- deb
contents:
- src: ./config-example.yaml
dst: /etc/headscale/config.yaml
type: config|noreplace
file_info:
mode: 0644
- src: ./docs/packaging/headscale.systemd.service
dst: /usr/lib/systemd/system/headscale.service
- dst: /var/lib/headscale
type: dir
- dst: /var/run/headscale
type: dir
scripts:
postinstall: ./docs/packaging/postinstall.sh
postremove: ./docs/packaging/postremove.sh
kos:
- id: ghcr
repository: ghcr.io/juanfont/headscale
# bare tells KO to only use the repository
# for tagging and naming the container.
bare: true
base_image: gcr.io/distroless/base-debian12
build: headscale
main: ./cmd/headscale
env:
- CGO_ENABLED=0
platforms:
- linux/amd64
- linux/386
- linux/arm64
- linux/arm/v7
tags:
- "{{ if not .Prerelease }}latest{{ end }}"
- "{{ if not .Prerelease }}{{ .Major }}.{{ .Minor }}.{{ .Patch }}"
- "{{ if not .Prerelease }}{{ .Major }}.{{ .Minor }}"
- "{{ if not .Prerelease }}{{ .Major }}"
- "{{ if not .Prerelease }}v{{ .Major }}.{{ .Minor }}.{{ .Patch }}"
- "{{ if not .Prerelease }}v{{ .Major }}.{{ .Minor }}"
- "{{ if not .Prerelease }}v{{ .Major }}"
- "{{ if not .Prerelease }}stable{{ else }}unstable{{ end }}"
- "{{ .Tag }}"
- '{{ trimprefix .Tag "v" }}'
- "sha-{{ .ShortCommit }}"
- id: dockerhub
build: headscale
base_image: gcr.io/distroless/base-debian12
repository: headscale/headscale
bare: true
platforms:
- linux/amd64
- linux/386
- linux/arm64
- linux/arm/v7
tags:
- "{{ if not .Prerelease }}latest{{ end }}"
- "{{ if not .Prerelease }}{{ .Major }}.{{ .Minor }}.{{ .Patch }}"
- "{{ if not .Prerelease }}{{ .Major }}.{{ .Minor }}"
- "{{ if not .Prerelease }}{{ .Major }}"
- "{{ if not .Prerelease }}v{{ .Major }}.{{ .Minor }}.{{ .Patch }}"
- "{{ if not .Prerelease }}v{{ .Major }}.{{ .Minor }}"
- "{{ if not .Prerelease }}v{{ .Major }}"
- "{{ if not .Prerelease }}stable{{ else }}unstable{{ end }}"
- "{{ .Tag }}"
- '{{ trimprefix .Tag "v" }}'
- "sha-{{ .ShortCommit }}"
- id: ghcr-debug
repository: ghcr.io/juanfont/headscale
bare: true
base_image: "debian:12"
build: headscale
main: ./cmd/headscale
env:
- CGO_ENABLED=0
platforms:
- linux/amd64
- linux/386
- linux/arm64
- linux/arm/v7
tags:
- "{{ if not .Prerelease }}latest{{ end }}-debug"
- "{{ if not .Prerelease }}{{ .Major }}.{{ .Minor }}.{{ .Patch }}-debug"
- "{{ if not .Prerelease }}{{ .Major }}.{{ .Minor }}-debug"
- "{{ if not .Prerelease }}{{ .Major }}-debug"
- "{{ if not .Prerelease }}v{{ .Major }}.{{ .Minor }}.{{ .Patch }}-debug"
- "{{ if not .Prerelease }}v{{ .Major }}.{{ .Minor }}-debug"
- "{{ if not .Prerelease }}v{{ .Major }}-debug"
- "{{ if not .Prerelease }}stable{{ else }}unstable{{ end }}-debug"
- "{{ .Tag }}-debug"
- '{{ trimprefix .Tag "v" }}-debug'
- "sha-{{ .ShortCommit }}-debug"
- id: dockerhub-debug
build: headscale
base_image: "debian:12"
repository: headscale/headscale
bare: true
platforms:
- linux/amd64
- linux/386
- linux/arm64
- linux/arm/v7
tags:
- "{{ if not .Prerelease }}latest{{ end }}-debug"
- "{{ if not .Prerelease }}{{ .Major }}.{{ .Minor }}.{{ .Patch }}-debug"
- "{{ if not .Prerelease }}{{ .Major }}.{{ .Minor }}-debug"
- "{{ if not .Prerelease }}{{ .Major }}-debug"
- "{{ if not .Prerelease }}v{{ .Major }}.{{ .Minor }}.{{ .Patch }}-debug"
- "{{ if not .Prerelease }}v{{ .Major }}.{{ .Minor }}-debug"
- "{{ if not .Prerelease }}v{{ .Major }}-debug"
- "{{ if not .Prerelease }}stable{{ else }}unstable{{ end }}-debug"
- "{{ .Tag }}-debug"
- '{{ trimprefix .Tag "v" }}-debug'
- "sha-{{ .ShortCommit }}-debug"
2021-06-14 09:17:23 +02:00
checksum:
2021-10-21 21:18:50 +02:00
name_template: "checksums.txt"
2021-06-14 09:17:23 +02:00
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
2021-10-21 21:18:50 +02:00
- "^docs:"
- "^test:"