builds:
  -
    id: linux
    env:
      - CGO_ENABLED=0
    goos:
      - linux
    goarch:
      - amd64
    ldflags:
      - -X github.com/cslamar/audiobooker/cmd.Version={{.Version}}
  -
    id: windows
    env:
      - CGO_ENABLED=0
    goos:
      - windows
    goarch:
      - amd64
    ldflags:
      - -X github.com/cslamar/audiobooker/cmd.Version={{.Version}}
  -
    id: darwin
    env:
      - CGO_ENABLED=0
    goos:
      - darwin
    goarch:
      - amd64
      - arm64
    ldflags:
      - -X github.com/cslamar/audiobooker/cmd.Version={{.Version}}

universal_binaries:
  - id: macos_universal
    ids:
      - darwin
    replace: true

archives:
  - id: windows
    builds:
      - windows
    format: zip
    name_template: '{{ .ProjectName }}_{{ .Os }}_{{- if eq .Arch "amd64" }}x86_64{{- else }}{{ .Arch }}{{ end }}'

  - id: linux
    builds:
      - linux
    format: tar.gz
    name_template: '{{ .ProjectName }}_{{ .Os }}_{{- if eq .Arch "amd64" }}x86_64{{- else }}{{ .Arch }}{{ end }}'

  - id: macos
    builds:
      - macos_universal
    format: zip
    name_template: '{{ .ProjectName }}_macos_universal'

checksum:
  name_template: 'checksums.txt'
snapshot:
  name_template: "{{ incpatch .Version }}-next"
changelog:
  sort: asc
  filters:
    exclude:
      - '^docs:'
      - '^test:'

release:
  ids:
    - windows
    - linux
    - macos

# The lines beneath this are called `modelines`. See `:help modeline`
# Feel free to remove those if you don't want/use them.
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
