version: 2

project_name: zlint

before:
  hooks:
    - go mod tidy

builds:
  - main: ./cmd/zlint/main.go
    binary: zlint
    env:
      - CGO_ENABLED=0
    goos:
      - linux
      - darwin
    goarch:
      - amd64

archives:
  - formats: [tar.gz]
    wrap_in_directory: true
    name_template: >-
      {{- .ProjectName }}_
      {{- .Version }}_
      {{- title .Os }}_
      {{- if eq .Arch "amd64" }}x86_64
      {{- else if eq .Arch "386" }}i386
      {{- else }}{{ .Arch }}{{ end }}
      {{- if .Arm }}v{{ .Arm }}{{ end -}}

snapshot:
  version_template: "{{ .Tag }}-next"

release:
  draft: true
  prerelease: auto
