mirror of
https://codeberg.org/cunicu/cunicu.git
synced 2026-04-22 22:57:04 +08:00
4e91e762e6
Signed-off-by: Steffen Vogel <post@steffenvogel.de>
317 lines
8.8 KiB
YAML
317 lines
8.8 KiB
YAML
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
|
|
---
|
|
project_name: cunicu
|
|
|
|
before:
|
|
hooks:
|
|
- make prepare
|
|
|
|
checksum:
|
|
name_template: "checksums.txt"
|
|
algorithm: sha256
|
|
|
|
# Signing is disabled here as we can not perform it in the CI
|
|
# Its is expected that the maintainer adds the checksum.asc file to the release by hand
|
|
# after the CI pipeline has created the release.
|
|
# This procedure is automated by the script: scripts/sign_release.sh
|
|
# signs:
|
|
# - artifacts: checksum
|
|
# signature: "${artifact}.asc"
|
|
# cmd: gpg
|
|
# args: ["-u", "09BE3BAE8D55D4CD8579285A9675EAC34897E6E2", "--output", "${signature}", "--detach-sign", "${artifact}"]
|
|
|
|
builds:
|
|
- id: cunicu
|
|
|
|
main: ./cmd/cunicu
|
|
binary: cunicu
|
|
|
|
env:
|
|
- CGO_ENABLED=0
|
|
|
|
goos:
|
|
- linux
|
|
- darwin
|
|
- freebsd
|
|
- windows
|
|
|
|
goarch:
|
|
- amd64
|
|
- arm64
|
|
- mips64
|
|
- mips64le
|
|
- riscv64
|
|
- ppc64le
|
|
- s390x
|
|
- "386"
|
|
- arm
|
|
- mips
|
|
- mipsle
|
|
|
|
goarm:
|
|
- "7"
|
|
|
|
gomips:
|
|
- softfloat
|
|
|
|
ignore:
|
|
- goos: windows
|
|
goarch: arm
|
|
- goos: windows
|
|
goarch: "386"
|
|
|
|
ldflags:
|
|
- -s
|
|
- -w
|
|
- -X github.com/stv0g/cunicu/pkg/util/buildinfo.Version=v{{.Version}}
|
|
- -X github.com/stv0g/cunicu/pkg/util/buildinfo.Commit={{.Commit}}
|
|
- -X github.com/stv0g/cunicu/pkg/util/buildinfo.DateStr={{.Date}}
|
|
- -X github.com/stv0g/cunicu/pkg/util/buildinfo.Tag={{.Tag}}
|
|
- -X github.com/stv0g/cunicu/pkg/util/buildinfo.Branch={{.Branch}}
|
|
- -X github.com/stv0g/cunicu/pkg/util/buildinfo.BuiltBy=goreleaser
|
|
|
|
archives:
|
|
- id: cunicu
|
|
|
|
builds:
|
|
- cunicu
|
|
|
|
format: tar.gz
|
|
|
|
files:
|
|
- LICENSE
|
|
- README.md
|
|
- etc/systemd/*
|
|
- completions/*
|
|
- etc/cunicu.yaml
|
|
- src: docs/usage/man/*
|
|
dst: man/
|
|
strip_parent: true
|
|
|
|
format_overrides:
|
|
- goos: windows
|
|
format: zip
|
|
|
|
nfpms:
|
|
- vendor: stv0g
|
|
homepage: https://github.com/stv0g/cunicu/
|
|
maintainer: Steffen Vogel <post@steffenvogel.de>
|
|
license: Apache 2.0
|
|
|
|
formats:
|
|
- apk
|
|
- deb
|
|
- rpm
|
|
|
|
recommends:
|
|
- wireguard-tools
|
|
|
|
contents:
|
|
- src: "./etc/systemd/cunicu.service"
|
|
dst: "/usr/lib/systemd/system/cunicu.service"
|
|
file_info:
|
|
mode: 0644
|
|
|
|
- src: "./etc/cunicu.yaml"
|
|
dst: "/etc/cunicu.example.yaml"
|
|
type: config
|
|
file_info:
|
|
mode: 0644
|
|
|
|
- src: "./docs/usage/man/*.1"
|
|
dst: "/usr/share/man/man1"
|
|
file_info:
|
|
mode: 0644
|
|
|
|
- src: ./completions/cunicu.bash
|
|
dst: /usr/share/bash-completion/completions/cunicu
|
|
file_info:
|
|
mode: 0644
|
|
|
|
- src: ./completions/cunicu.fish
|
|
dst: /usr/share/fish/completions/cunicu.fish
|
|
file_info:
|
|
mode: 0644
|
|
|
|
- src: ./completions/cunicu.zsh
|
|
dst: /usr/share/zsh/vendor-completions/_cunicu
|
|
file_info:
|
|
mode: 0644
|
|
|
|
dockers:
|
|
- use: buildx
|
|
dockerfile: Dockerfile.scratch
|
|
goos: linux
|
|
goarch: amd64
|
|
image_templates:
|
|
- "ghcr.io/stv0g/{{ .ProjectName }}:latest-amd64"
|
|
- "ghcr.io/stv0g/{{ .ProjectName }}:v{{ .Major }}-amd64"
|
|
- "ghcr.io/stv0g/{{ .ProjectName }}:v{{ .Major }}.{{ .Minor }}-amd64"
|
|
- "ghcr.io/stv0g/{{ .ProjectName }}:v{{ .Major }}.{{ .Minor }}.{{ .Patch }}-amd64"
|
|
build_flag_templates:
|
|
- --platform=linux/amd64
|
|
- --label=org.opencontainers.image.title={{ .ProjectName }}
|
|
- --label=org.opencontainers.image.description={{ .ProjectName }}
|
|
- --label=org.opencontainers.image.url=https://github.com/stv0g/{{ .ProjectName }}
|
|
- --label=org.opencontainers.image.source=https://github.com/stv0g/{{ .ProjectName }}
|
|
- --label=org.opencontainers.image.version={{ .Version }}
|
|
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
|
|
- --label=org.opencontainers.image.revision={{ .FullCommit }}
|
|
- --label=org.opencontainers.image.licenses=Apache-2.0
|
|
|
|
- use: buildx
|
|
dockerfile: Dockerfile.scratch
|
|
goos: linux
|
|
goarch: arm64
|
|
image_templates:
|
|
- "ghcr.io/stv0g/{{ .ProjectName }}:latest-arm64v8"
|
|
- "ghcr.io/stv0g/{{ .ProjectName }}:v{{ .Major }}-arm64v8"
|
|
- "ghcr.io/stv0g/{{ .ProjectName }}:v{{ .Major }}.{{ .Minor }}-arm64v8"
|
|
- "ghcr.io/stv0g/{{ .ProjectName }}:v{{ .Major }}.{{ .Minor }}.{{ .Patch }}-arm64v8"
|
|
build_flag_templates:
|
|
- --platform=linux/arm64/v8
|
|
- --label=org.opencontainers.image.title={{ .ProjectName }}
|
|
- --label=org.opencontainers.image.description={{ .ProjectName }}
|
|
- --label=org.opencontainers.image.url=https://github.com/stv0g/{{ .ProjectName }}
|
|
- --label=org.opencontainers.image.source=https://github.com/stv0g/{{ .ProjectName }}
|
|
- --label=org.opencontainers.image.version={{ .Version }}
|
|
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
|
|
- --label=org.opencontainers.image.revision={{ .FullCommit }}
|
|
- --label=org.opencontainers.image.licenses=Apache-2.0
|
|
|
|
- use: buildx
|
|
dockerfile: Dockerfile.scratch
|
|
goos: linux
|
|
goarch: arm
|
|
goarm: "7"
|
|
image_templates:
|
|
- "ghcr.io/stv0g/{{ .ProjectName }}:latest-armv7"
|
|
- "ghcr.io/stv0g/{{ .ProjectName }}:v{{ .Major }}-armv7"
|
|
- "ghcr.io/stv0g/{{ .ProjectName }}:v{{ .Major }}.{{ .Minor }}-armv7"
|
|
- "ghcr.io/stv0g/{{ .ProjectName }}:v{{ .Major }}.{{ .Minor }}.{{ .Patch }}-armv7"
|
|
build_flag_templates:
|
|
- --platform=linux/arm/v7
|
|
- --label=org.opencontainers.image.title={{ .ProjectName }}
|
|
- --label=org.opencontainers.image.description={{ .ProjectName }}
|
|
- --label=org.opencontainers.image.url=https://github.com/stv0g/{{ .ProjectName }}
|
|
- --label=org.opencontainers.image.source=https://github.com/stv0g/{{ .ProjectName }}
|
|
- --label=org.opencontainers.image.version={{ .Version }}
|
|
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
|
|
- --label=org.opencontainers.image.revision={{ .FullCommit }}
|
|
- --label=org.opencontainers.image.licenses=Apache-2.0
|
|
|
|
docker_manifests:
|
|
- name_template: "ghcr.io/stv0g/{{ .ProjectName }}:v{{ .Version }}"
|
|
image_templates:
|
|
- "ghcr.io/stv0g/{{ .ProjectName }}:v{{ .Version }}-amd64"
|
|
- "ghcr.io/stv0g/{{ .ProjectName }}:v{{ .Version }}-armv7"
|
|
- "ghcr.io/stv0g/{{ .ProjectName }}:v{{ .Version }}-arm64v8"
|
|
- name_template: "ghcr.io/stv0g/{{ .ProjectName }}:latest"
|
|
image_templates:
|
|
- "ghcr.io/stv0g/{{ .ProjectName }}:v{{ .Version }}-amd64"
|
|
- "ghcr.io/stv0g/{{ .ProjectName }}:v{{ .Version }}-armv7"
|
|
- "ghcr.io/stv0g/{{ .ProjectName }}:v{{ .Version }}-arm64v8"
|
|
|
|
snapshot:
|
|
name_template: "{{ incpatch .Version }}-next"
|
|
|
|
publishers:
|
|
- name: Gemfury
|
|
cmd: >-
|
|
bash -c "
|
|
if [[ ${ARTIFACT_PATH} == *.rpm || ${ARTIFACT_PATH} == *.deb || ${ARTIFACT_PATH} == *.apk ]]; then
|
|
curl -F package=@${ARTIFACT_PATH} https://${GEMFURY_TOKEN}@push.fury.io/cunicu/
|
|
fi
|
|
"
|
|
env:
|
|
- GEMFURY_TOKEN={{ .Env.GEMFURY_TOKEN }}
|
|
- ARTIFACT_PATH={{ .ArtifactPath }}
|
|
|
|
universal_binaries:
|
|
- replace: true
|
|
|
|
brews:
|
|
- ids:
|
|
- cunicu
|
|
|
|
tap:
|
|
owner: stv0g
|
|
name: homebrew-cunicu
|
|
token: "{{ .Env.TAP_GITHUB_TOKEN }}"
|
|
|
|
homepage: "https://cunicu.li"
|
|
description: "A zeroconf peer-to-peer mesh VPN using Wireguard® and Interactive Connectivity Establishment (ICE)"
|
|
license: "Apache-2.0"
|
|
|
|
dependencies:
|
|
- name: bash-completion
|
|
type: optional
|
|
- name: wireguard-tools
|
|
type: optional
|
|
|
|
install: |-
|
|
bin.install "cunicu"
|
|
etc.install "etc/cunicu.yaml"
|
|
bash_completion.install "completions/cunicu.bash" => "cunicu"
|
|
zsh_completion.install "completions/cunicu.zsh" => "_cunicu"
|
|
fish_completion.install "completions/cunicu.fish"
|
|
man1.install Dir["man/*.1"]
|
|
|
|
aurs:
|
|
- ids:
|
|
- cunicu
|
|
|
|
homepage: "https://cunicu.li"
|
|
description: "A zeroconf peer-to-peer mesh VPN using Wireguard® and Interactive Connectivity Establishment (ICE)"
|
|
license: "Apache-2.0"
|
|
|
|
maintainers:
|
|
- 'Steffen Vogel <post@steffenvogel.de>'
|
|
|
|
private_key: '{{ .Env.AUR_KEY }}'
|
|
git_url: 'ssh://aur@aur.archlinux.org/cunicu-bin.git'
|
|
|
|
skip_upload: auto
|
|
|
|
optdepends:
|
|
- 'bash-completion: for shell completions'
|
|
- 'wireguard-tools: for controlling WireGuard interfaces'
|
|
|
|
package: |-
|
|
# bin
|
|
install -Dm755 "./cunicu" "${pkgdir}/usr/bin/cunicu"
|
|
|
|
# config
|
|
install -Dm644 "./etc/cunicu.yaml" "${pkgdir}/etc/cunicu.example.yaml"
|
|
install -Dm644 "./etc/systemd/cunicu.service" "${pkgdir}/usr/lib/systemd/cunicu.service"
|
|
|
|
# license
|
|
install -Dm644 "./LICENSE" "${pkgdir}/usr/share/licenses/cunicu/LICENSE"
|
|
|
|
# manpages
|
|
install -d "${pkgdir}/usr/share/man/man1"
|
|
install -Dm644 ./man/*.1 "${pkgdir}/usr/share/man/man1"
|
|
|
|
# completions
|
|
mkdir -p "${pkgdir}/usr/share/bash-completion/completions/"
|
|
mkdir -p "${pkgdir}/usr/share/zsh/site-functions/"
|
|
mkdir -p "${pkgdir}/usr/share/fish/vendor_completions.d/"
|
|
install -Dm644 "./completions/cunicu.bash" "${pkgdir}/usr/share/bash-completion/completions/cunicu"
|
|
install -Dm644 "./completions/cunicu.zsh" "${pkgdir}/usr/share/zsh/site-functions/_cunicu"
|
|
install -Dm644 "./completions/cunicu.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/cunicu.fish"
|
|
|
|
changelog:
|
|
sort: asc
|
|
filters:
|
|
exclude:
|
|
- '^docs:'
|
|
- '^test:'
|
|
|
|
release:
|
|
github:
|
|
owner: stv0g
|
|
name: cunicu
|
|
|
|
draft: true
|
|
prerelease: auto
|