version: 2
builds:
  - main: ./protoc-gen-grpc-gateway/main.go
    id: protoc-gen-grpc-gateway
    binary: protoc-gen-grpc-gateway
    env:
      - CGO_ENABLED=0
    goos:
      - linux
      - darwin
      - windows
    goarch:
      - amd64
      - arm64
  - main: ./protoc-gen-openapiv2/main.go
    id: protoc-gen-openapiv2
    binary: protoc-gen-openapiv2
    env:
      - CGO_ENABLED=0
    goos:
      - linux
      - darwin
      - windows
    goarch:
      - amd64
      - arm64
archives:
  - name_template: '{{ .Binary }}-{{ .Tag }}-{{ .Os }}-{{if eq .Arch "amd64"}}x86_64{{else}}{{ .Arch }}{{end}}'
    format: binary
dist: _output
