project_name: newreleases

builds:
  - main: ./newreleases/main.go

    binary: newreleases

    flags:
      - -v
      - -trimpath

    ldflags:
      - -s -w

    env:
      - CGO_ENABLED=0

    goos:
      - darwin
      - linux
      - windows

    goarch:
      - amd64
      - 386
      - arm64
      - arm

    ignore:
      - goos: darwin
        goarch: 386
      - goos: darwin
        goarch: arm64
      - goos: darwin
        goarch: arm
      - goos: windows
        goarch: arm64
      - goos: windows
        goarch: arm

archives:
  - name_template: "{{ tolower .ProjectName }}-{{ tolower .Os }}-{{ tolower .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"

    format: binary

nfpms:
  - file_name_template: "{{ tolower .ProjectName }}-{{ tolower .Os }}-{{ tolower .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"

    vendor: NewReleases
    homepage: https://newreleases.io/

    maintainer: Janoš Guljaš <janos@newreleases.io>

    description: NewReleases command line client.

    license: BSD

    formats:
      - deb
      - rpm

    bindir: /usr/bin
