version: 2

project_name: blogwatcher

builds:
  - id: blogwatcher
    main: ./cmd/blogwatcher
    binary: blogwatcher
    env:
      - CGO_ENABLED=1
    goos:
      - linux
    goarch:
      - amd64
    ldflags:
      - -s -w -X github.com/Hyaxia/blogwatcher/internal/version.Version={{.Version}}

archives:
  - id: blogwatcher
    builds:
      - blogwatcher
    name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
    format: tar.gz
    format_overrides:
      - goos: windows
        format: zip

checksum:
  name_template: "{{ .ProjectName }}_checksums.txt"

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

brews:
  - name: blogwatcher
    description: "Track blog articles and detect new posts."
    homepage: "https://github.com/Hyaxia/blogwatcher"
    license: "MIT"
    repository:
      owner: Hyaxia
      name: homebrew-tap
      token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
    install: |
      bin.install "blogwatcher"
    test: |
      system "#{bin}/blogwatcher", "--version"
