version: 2
project_name: blucli

before:
  hooks:
    - go test ./...

builds:
  - id: blu
    main: ./cmd/blu/main.go
    binary: blu
    env:
      - CGO_ENABLED=0
    ldflags:
      - -s -w -X main.version={{.Version}}
    goos:
      - darwin
      - linux
      - windows
    goarch:
      - amd64
      - arm64

archives:
  - id: default
    builds:
      - blu
    name_template: >-
      {{ .ProjectName }}-{{- if eq .Os "darwin" -}}macos{{- else if eq .Os "windows" -}}windows{{- else -}}{{ .Os }}{{- end -}}-{{ .Arch }}
    files:
      - LICENSE
      - README.md
    format_overrides:
      - goos: windows
        format: zip

checksum:
  name_template: checksums.txt

changelog:
  sort: asc
  filters:
    exclude:
      - "^docs:"
      - "^test:"
