language: go
sudo: true
services:
  - docker
go:
  - 1.11.x
before_install:
  - go get golang.org/x/lint/golint
  - go get honnef.co/go/tools/cmd/staticcheck
jobs:
  include:
    - script:
        - make fmt lint staticcheck vet install
        - DOCKER_API_VERSION=1.38 make dind dtest
    - stage: Build Release
      script:
        - make release
        - echo "Deploying to GitHub releases ..."
      deploy:
        provider: releases
        file:
          - cross/reg-darwin-amd64
          - cross/reg-darwin-amd64.md5
          - cross/reg-darwin-amd64.sha256
          - cross/reg-darwin-386
          - cross/reg-darwin-386.md5
          - cross/reg-darwin-386.sha256
          - cross/reg-freebsd-amd64
          - cross/reg-freebsd-amd64.md5
          - cross/reg-freebsd-amd64.sha256
          - cross/reg-freebsd-386
          - cross/reg-freebsd-386.md5
          - cross/reg-freebsd-386.sha256
          - cross/reg-linux-arm
          - cross/reg-linux-arm.md5
          - cross/reg-linux-arm.sha256
          - cross/reg-linux-arm64
          - cross/reg-linux-arm64.md5
          - cross/reg-linux-arm64.sha256
          - cross/reg-linux-amd64
          - cross/reg-linux-amd64.md5
          - cross/reg-linux-amd64.sha256
          - cross/reg-linux-386
          - cross/reg-linux-386.md5
          - cross/reg-linux-386.sha256
          - cross/reg-windows-amd64
          - cross/reg-windows-amd64.md5
          - cross/reg-windows-amd64.sha256
          - cross/reg-windows-386
          - cross/reg-windows-386.md5
          - cross/reg-windows-386.sha256
        skip_cleanup: true
        on:
          tags: true
        api_key:
          secure: "TTOf5iX7bX9i2t5S8RoYdQ4w07vcc5gRoO2B7DzwmLsaMhWRi/bwOh7A2b77apaT1Mc6YytYlkqEqve/W8YTeWhJRZSevtN1GmSv1Hkryu8t5b53SFba1ka0/FVG0qTO0d7NT5JUx8C7Yw1ZZhfW2oJCt9nZWIYT/5JFLm21prdOHTsUIc7XUnXa5etFAbMxMU8c6sz42m2zEkfTgv59DNeaF754W40pDWsayI1zjZYiHImdSdueNzNrhaSIp8AYF5dVXJgYAltYx38Af6XY77sJ+/jpCYONA8BDYygppibdtwFsVjLr1sXv7c2p1p8yZNblj37RyH3DYHCki8pXyZm87jqATiNJromvFVx5oGDpNzd+jCHHidrb7+cOIEepYE8DKMh0+q5N/hVJWR3nUzVeerfgxuNiGxYbQtxz5ZPXUFCkBLrj38fOuxPeupJdbB8LCRdljHEcoDMCSlHMDyCFseZwBSAkgRGMuVO7LDi2fa/ykL3rugG9oOnUvRjWzAAyp9TRKNvSvk7xIce6va7TfzA9Baah2eHuS07XnZDWgfL04mToiuWnZs01wPNf5HsPjgKxPwwGWYP+S3zIdWwX8fyrxfriguu6xSBytM7VDhtPD/sFXluVGIEf5tEsWL+pI9nfEMYxsaDgIE8MTtj37miKuy9aSTOOeiYBVXs="
