env:
  - GO111MODULE=on
  - CGO_ENABLED=0
  - GOFLAGS=-mod=vendor
  - GOPROXY=off
builds:
  - id: cfssl-darwin
    binary: cfssl
    env:
      - CC=o64-clang
      - CXX=o64-clang++
      - CGO_ENABLED=1
    goos:
      - darwin
    goarch:
      - amd64
      - arm64
    main: ./cmd/cfssl
    ldflags:
      - -s -w -X github.com/cloudflare/cfssl/cli/version.version={{.Version}}
    flags:
      - -buildvcs=false
  - id: cfssl-linux
    binary: cfssl
    goos:
      - linux
    goarch:
      - amd64
      - arm
      - arm64
      - s390x
    main: ./cmd/cfssl
    ldflags:
      - -s -w -X github.com/cloudflare/cfssl/cli/version.version={{.Version}}
    flags:
      - -buildvcs=false
  - id: cfssl-windows
    binary: cfssl
    env:
      - CC=x86_64-w64-mingw32-gcc
      - CXX=x86_64-w64-mingw32-g++
    goos:
      - windows
    goarch:
      - amd64
    main: ./cmd/cfssl
    ldflags:
      - -s -w -X github.com/cloudflare/cfssl/cli/version.version={{.Version}}
    flags:
      - -buildvcs=false
  - id: cfssl-bundle-darwin
    binary: cfssl-bundle
    env:
      - CC=o64-clang
      - CXX=o64-clang++
      - CGO_ENABLED=1
    goos:
      - darwin
    goarch:
      - amd64
    main: ./cmd/cfssl-bundle
    ldflags:
      - -s -w -X github.com/cloudflare/cfssl/cli/version.version={{.Version}}
    flags:
      - -buildvcs=false
  - id: cfssl-bundle-linux
    binary: cfssl-bundle
    goos:
      - linux
    goarch:
      - amd64
      - arm
      - arm64
      - s390x
    main: ./cmd/cfssl-bundle
    ldflags:
      - -s -w -X github.com/cloudflare/cfssl/cli/version.version={{.Version}}
    flags:
      - -buildvcs=false
  - id: cfssl-bundle-windows
    binary: cfssl-bundle
    env:
      - CC=x86_64-w64-mingw32-gcc
      - CXX=x86_64-w64-mingw32-g++
    goos:
      - windows
    goarch:
      - amd64
    main: ./cmd/cfssl-bundle
    ldflags:
      - -s -w -X github.com/cloudflare/cfssl/cli/version.version={{.Version}}
    flags:
      - -buildvcs=false
  - id: cfssl-certinfo-darwin
    binary: cfssl-certinfo
    env:
      - CC=o64-clang
      - CXX=o64-clang++
      - CGO_ENABLED=1
    goos:
      - darwin
    goarch:
      - amd64
    main: ./cmd/cfssl-certinfo
    ldflags:
      - -s -w -X github.com/cloudflare/cfssl/cli/version.version={{.Version}}
    flags:
      - -buildvcs=false
  - id: cfssl-certinfo-linux
    binary: cfssl-certinfo
    goos:
      - linux
    goarch:
      - amd64
      - arm
      - arm64
      - s390x
    main: ./cmd/cfssl-certinfo
    ldflags:
      - -s -w -X github.com/cloudflare/cfssl/cli/version.version={{.Version}}
    flags:
      - -buildvcs=false
  - id: cfssl-certinfo-windows
    binary: cfssl-certinfo
    env:
      - CC=x86_64-w64-mingw32-gcc
      - CXX=x86_64-w64-mingw32-g++
    goos:
      - windows
    goarch:
      - amd64
    main: ./cmd/cfssl-certinfo
    ldflags:
      - -s -w -X github.com/cloudflare/cfssl/cli/version.version={{.Version}}
    flags:
      - -buildvcs=false
  - id: cfssl-newkey-darwin
    binary: cfssl-newkey
    env:
      - CC=o64-clang
      - CXX=o64-clang++
      - CGO_ENABLED=1
    goos:
      - darwin
    goarch:
      - amd64
    main: ./cmd/cfssl-newkey
    ldflags:
      - -s -w -X github.com/cloudflare/cfssl/cli/version.version={{.Version}}
    flags:
      - -buildvcs=false
  - id: cfssl-newkey-linux
    binary: cfssl-newkey
    goos:
      - linux
    goarch:
      - amd64
      - arm
      - arm64
      - s390x
    main: ./cmd/cfssl-newkey
    ldflags:
      - -s -w -X github.com/cloudflare/cfssl/cli/version.version={{.Version}}
    flags:
      - -buildvcs=false
  - id: cfssl-newkey-windows
    binary: cfssl-newkey
    env:
      - CC=x86_64-w64-mingw32-gcc
      - CXX=x86_64-w64-mingw32-g++
    goos:
      - windows
    goarch:
      - amd64
    main: ./cmd/cfssl-newkey
    ldflags:
      - -s -w -X github.com/cloudflare/cfssl/cli/version.version={{.Version}}
    flags:
      - -buildvcs=false
  - id: cfssl-scan-darwin
    binary: cfssl-scan
    env:
      - CC=o64-clang
      - CXX=o64-clang++
      - CGO_ENABLED=1
    goos:
      - darwin
    goarch:
      - amd64
    main: ./cmd/cfssl-scan
    ldflags:
      - -s -w -X github.com/cloudflare/cfssl/cli/version.version={{.Version}}
    flags:
      - -buildvcs=false
  - id: cfssl-scan-linux
    binary: cfssl-scan
    goos:
      - linux
    goarch:
      - amd64
      - arm
      - arm64
      - s390x
    main: ./cmd/cfssl-scan
    ldflags:
      - -s -w -X github.com/cloudflare/cfssl/cli/version.version={{.Version}}
    flags:
      - -buildvcs=false
  - id: cfssl-scan-windows
    binary: cfssl-scan
    env:
      - CC=x86_64-w64-mingw32-gcc
      - CXX=x86_64-w64-mingw32-g++
    goos:
      - windows
    goarch:
      - amd64
    main: ./cmd/cfssl-scan
    ldflags:
      - -s -w -X github.com/cloudflare/cfssl/cli/version.version={{.Version}}
    flags:
      - -buildvcs=false
  - id: cfssljson-darwin
    binary: cfssljson
    env:
      - CC=o64-clang
      - CXX=o64-clang++
      - CGO_ENABLED=1
    goos:
      - darwin
    goarch:
      - amd64
    main: ./cmd/cfssljson
    ldflags:
      - -s -w -X github.com/cloudflare/cfssl/cli/version.version={{.Version}}
    flags:
      - -buildvcs=false
  - id: cfssljson-linux
    binary: cfssljson
    goos:
      - linux
    goarch:
      - amd64
      - arm
      - arm64
      - s390x
    main: ./cmd/cfssljson
    ldflags:
      - -s -w -X github.com/cloudflare/cfssl/cli/version.version={{.Version}}
    flags:
      - -buildvcs=false
  - id: cfssljson-windows
    binary: cfssljson
    env:
      - CC=x86_64-w64-mingw32-gcc
      - CXX=x86_64-w64-mingw32-g++
    goos:
      - windows
    goarch:
      - amd64
    main: ./cmd/cfssljson
    ldflags:
      - -s -w -X github.com/cloudflare/cfssl/cli/version.version={{.Version}}
    flags:
      - -buildvcs=false
  - id: mkbundle-darwin
    binary: mkbundle
    env:
      - CC=o64-clang
      - CXX=o64-clang++
      - CGO_ENABLED=1
    goos:
      - darwin
    goarch:
      - amd64
    main: ./cmd/mkbundle
    ldflags:
      - -s -w -X github.com/cloudflare/cfssl/cli/version.version={{.Version}}
    flags:
      - -buildvcs=false
  - id: mkbundle-linux
    binary: mkbundle
    goos:
      - linux
    goarch:
      - amd64
      - arm
      - arm64
      - s390x
    main: ./cmd/mkbundle
    ldflags:
      - -s -w -X github.com/cloudflare/cfssl/cli/version.version={{.Version}}
    flags:
      - -buildvcs=false
  - id: mkbundle-windows
    binary: mkbundle
    env:
      - CC=x86_64-w64-mingw32-gcc
      - CXX=x86_64-w64-mingw32-g++
    goos:
      - windows
    goarch:
      - amd64
    main: ./cmd/mkbundle
    ldflags:
      - -s -w -X github.com/cloudflare/cfssl/cli/version.version={{.Version}}
    flags:
      - -buildvcs=false
  - id: multirootca-darwin
    binary: multirootca
    env:
      - CC=o64-clang
      - CXX=o64-clang++
      - CGO_ENABLED=1
    goos:
      - darwin
    goarch:
      - amd64
    main: ./cmd/multirootca
    ldflags:
      - -s -w -X github.com/cloudflare/cfssl/cli/version.version={{.Version}}
    flags:
      - -buildvcs=false
  - id: multirootca-linux
    binary: multirootca
    goos:
      - linux
    goarch:
      - amd64
      - arm
      - arm64
      - s390x
    main: ./cmd/multirootca
    ldflags:
      - -s -w -X github.com/cloudflare/cfssl/cli/version.version={{.Version}}
    flags:
      - -buildvcs=false
  - id: multirootca-windows
    binary: multirootca
    env:
      - CC=x86_64-w64-mingw32-gcc
      - CXX=x86_64-w64-mingw32-g++
    goos:
      - windows
    goarch:
      - amd64
    main: ./cmd/multirootca
    ldflags:
      - -s -w -X github.com/cloudflare/cfssl/cli/version.version={{.Version}}
    flags:
      - -buildvcs=false
archives:
  - format: binary
    allow_different_binary_count: true # https://github.com/goreleaser/goreleaser/pull/1841
release:
  github:
    owner: cloudflare
    name: cfssl
  prerelease: auto
changelog:
  sort: asc
