appuio/tailscale-service-observer

View on GitHub
.goreleaser.yml

Summary

Maintainability
Test Coverage
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
builds:
- env:
  - CGO_ENABLED=0 # this is needed otherwise the Docker image build is faulty
  goarch:
  - amd64
  - arm64
  goos:
  - linux
  goarm:
  - 8

archives:
- format: binary
  name_template: "{{ .Binary }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"

checksum:
  name_template: "checksums.txt"

snapshot:
  name_template: "{{ incpatch .Version }}-snapshot"

dockers:
- goarch: amd64
  use: buildx
  build_flag_templates:
  - "--platform=linux/amd64"
  image_templates:
  - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:v{{ .Version }}-amd64"

- goarch: arm64
  use: buildx
  build_flag_templates:
    - "--platform=linux/arm64/v8"
  image_templates:
  - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:v{{ .Version }}-arm64"

docker_manifests:
  ## ghcr.io
  # For prereleases, updating `latest` does not make sense.
  # Only the image for the exact version should be pushed.
  - name_template: "{{ if not .Prerelease }}{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest{{ end }}"
    image_templates:
      - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:v{{ .Version }}-amd64"
      - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:v{{ .Version }}-arm64"

  - name_template: "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:v{{ .Version }}"
    image_templates:
      - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:v{{ .Version }}-amd64"
      - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:v{{ .Version }}-arm64"

release:
  prerelease: auto