version: 2
changelog:
  disable: true

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

env:
  - GO111MODULE=on
  - GOPROXY=https://proxy.golang.org

before:
  hooks:
    - go mod download

archives:
  - name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
    format_overrides:
      - goos: windows
        format: zip

builds:
  - id: windows
    binary: berty
    env: ["CGO_ENABLED=1"]
    goos: ["windows"]
    goarch: ["amd64"]
    dir: go/cmd/berty
    flags:
      - "-a"
    ldflags:
      - "-X berty.tech/berty/v2/go/pkg/bertyversion.VcsRef=$(VCS_REF) -X berty.tech/berty/v2/go/pkg/bertyversion.Version=$(VERSION)"
