version: 2
project_name: goexec

before:
  hooks:
    - go mod tidy
    - go generate ./...
builds:
  - env:
      - CGO_ENABLED=0
    ldflags: -s -w
    flags:
      - -trimpath
    goos:
      - darwin
      - windows
      - linux
    goarch:
      - amd64
      - arm64
      - riscv64

#upx:
#   - enabled: true
#   goos: [ linux ]
#   compress: best
#   lzma: true

archives:
  - name_template: "{{ .ProjectName }}_{{ .Tag }}_{{ .Os }}_{{ .Arch }}"
    files:
      - README.md
      - LICENSE
    format_overrides:
      - goos: windows
        format: zip

checksum:
  name_template: "checksums.txt"
snapshot:
  name_template: "{{ incpatch .Version }}"
changelog:
  sort: asc
  filters:
    exclude:
      - "^docs:"
      - "^doc:"
      - "^ci:"
      - "^Merge pull request"
