version: 2

before:
  hooks:
    - go mod tidy

snapshot:
  version_template: "{{ .Tag }}"
checksum:
  name_template: "checksums.txt"

builds:
  - id: build
    binary: marzban-exporter
    env:
      - CGO_ENABLED=0
    goos:
      - linux
      - windows
      - darwin
    goarch:
      - amd64
      - arm64
    ldflags:
      - -s -w
      - -X main.version={{ .Tag }}
      - -X main.commit={{.Commit}}

archives:
  - id: marzban-exporter
    format: tar.gz
    name_template: "{{ .ProjectName }}-v{{ .Version }}-{{ .Os }}-{{ .Arch }}"
    format_overrides:
      - goos: windows
        format: zip
    files:
      - README.md

release:
  github:
    owner: kutovoys
    name: marzban-exporter
  name_template: "v{{ .Version }}"

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