builds:
  - id: darwin-amd64
    main: ./
    binary: goskyr
    goos:
      - darwin
    goarch:
      - amd64
    env:
      - CC=o64-clang
      - CXX=o64-clang++
    flags:
      - -mod=readonly
      - -tags=timetzdata
    ldflags:
      - -s -w -X main.version={{.Version}}
  - id: darwin-arm64
    main: ./
    binary: goskyr
    goos:
      - darwin
    goarch:
      - arm64
    env:
      - CC=oa64-clang
      - CXX=oa64-clang++
    flags:
      - -mod=readonly
      - -tags=timetzdata
    ldflags:
      - -s -w -X main.version={{.Version}}
  - id: linux-amd64
    main: ./
    binary: goskyr
    goos:
      - linux
    goarch:
      - amd64
    env:
      - CC=x86_64-linux-gnu-gcc
      - CXX=x86_64-linux-gnu-g++
    flags:
      - -mod=readonly
      - -tags=timetzdata
    ldflags:
      - -s -w -X main.version={{.Version}}
  - id: linux-armhf
    main: ./
    binary: goskyr
    goos:
      - linux
    goarch:
      - arm
    goarm:
      - 7
    env:
      - CC=arm-linux-gnueabihf-gcc
      - CXX=arm-linux-gnueabihf-g++
    flags:
      - -mod=readonly
      - -tags=timetzdata
    ldflags:
      - -s -w -X main.version={{.Version}}
  - id: windows-amd64
    main: ./
    binary: goskyr
    goos:
      - windows
    goarch:
      - amd64
    env:
      - CC=x86_64-w64-mingw32-gcc
      - CXX=x86_64-w64-mingw32-g++
    flags:
      - -mod=readonly
      - -tags=timetzdata
    ldflags:
      - -s -w -X main.version={{.Version}}
  - id: windows-arm64
    main: ./
    binary: goskyr
    goos:
      - windows
    goarch:
      - arm64
    env:
      - CC=/llvm-mingw/bin/aarch64-w64-mingw32-gcc
      - CXX=/llvm-mingw/bin/aarch64-w64-mingw32-g++
    flags:
      - -mod=readonly
      - -tags=timetzdata
    ldflags:
      - -s -w -X main.version={{.Version}}
archives:
  - id: goskyr
    builds:
      - darwin-amd64
      - darwin-arm64
      - linux-amd64
      - linux-armhf
      - windows-amd64
      - windows-arm64
    name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
    # format: zip
    wrap_in_directory: true
checksum:
  name_template: "checksums.txt"
snapshot:
  name_template: "{{ .Tag }}"
changelog:
  sort: asc
  filters:
    exclude:
      - "^docs:"
      - "^test:"

release:
  github:
    owner: jakopako
    name: goskyr
  prerelease: auto
  draft: false
