language: go
go:
  - 1.11.x
install:
  - echo noop
before_script:
  # travis ci currently sets GOPATH even with go1.11.
  # force-setting GO111MODULE=on to use vgo
  - env GO111MODULE=on go mod download
script:
  # travis ci currently sets GOPATH even with go1.11.
  # force-setting GO111MODULE=on to use vgo
  - env GO111MODULE=on go build -v -o /dev/null
deploy:
  # use goreleaser to prepare dist/
  - provider: script
    skip_cleanup: true
    on:
      tags: true
    script: curl -sL https://git.io/goreleaser | bash
  # use github release feature to upload dist/
  - provider: releases
    skip_cleanup: true
    on:
      tags: true
    file_glob: true
    file:
      - dist/*.tar.gz
      - dist/*.zip
      - dist/checksums.txt
    api_key:
      secure: r1GMgbVDnZTUcny/PbIATW9dXGOTpm2U9iEGaWvpprMO2AGo7ju7SWEJWtjcap3pc0YasyR2/eon9LC0scWY0Xlpeb+g0pRCQ39FABk1Vo3DpmIPRUCFFkaescWmrWDj3ImzjJgZjCewwK6Fo8s8ngnqIlZnE1Hq6ls2xDp6jNVf+Pn7LyqxkK4axFFSPQM9zFX3N1PVUH5RT03bIJfojJZguqnhNfyTvKvHJidoeWU/Ie+fXc4AdPHyP85xrmGHYl68O0HziU6JCLXira8r1FjUgVeYFYC5nnNuylszO6JWqWh1nXYDxs5FGPnZd9N8bEi/2ahiqms8eV7S+/DGzhSoEdHikcBxTgJpZP2VOmvRSITyv3RleJzCeMULTGFQodoxRgA/Q8qZySvInNjstiBjV2Pyucrnn990XQbN8rIV4RmNggJvbAwJNCGjCwS2eB42EKNCODTuzHPbIV0ap4EjvfBBo0cZ2J9M2Q6VzdpNErdntpM1hZl9yymv3MNN4hOiLQKkofoo/QI3cffB8Y0PBPAL8Cs9Mx1bbx+Dr8iitTHBUAt4a5DHFen4MS8znrZ+Cr4kLDD9QPJ8G0oh4tDKq8CJ73Gt+xqkLZEuka0W1awz9essqE7MH20kRJbKa5woTIs0v9njHMpbeqd7KrNV+1e5F5aPRQyiCzaom7c=
