before:
  hooks:
    - go mod tidy

report_sizes: true

builds:
  - env: [CGO_ENABLED=0]
    goos:
      - linux
      - darwin
      - windows
    goarch:
      - "386"
      - amd64
      - arm
      - arm64
    goarm:
      - "7"
    ignore:
      - goos: windows
        goarch: arm
    mod_timestamp: "{{ .CommitTimestamp }}"
    flags:
      - -trimpath
    ldflags:
      - -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{ .CommitDate }} -X main.builtBy=goreleaser -X main.treeState={{ .IsGitDirty }}

checksum:
  name_template: "checksums.txt"

changelog:
  sort: asc
  use: github
  filters:
    exclude:
      - "^test:"
      - "^chore"
      - "merge conflict"
      - Merge pull request
      - Merge remote-tracking branch
      - Merge branch
      - go mod tidy
  groups:
    - title: Dependency updates
      regexp: '^.*?(feat|fix)\(deps\)!?:.+$'
      order: 300
    - title: "New Features"
      regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
      order: 100
    - title: "Security updates"
      regexp: '^.*?sec(\([[:word:]]+\))??!?:.+$'
      order: 150
    - title: "Bug fixes"
      regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
      order: 200
    - title: "Documentation updates"
      regexp: ^.*?doc(\([[:word:]]+\))??!?:.+$
      order: 400
    - title: "Build process updates"
      regexp: ^.*?build(\([[:word:]]+\))??!?:.+$
      order: 400
    - title: Other work
      order: 9999