sudo: false
language: go
go:
  - tip
before_install:
  - go get -v github.com/mitchellh/gox
  - go get -v github.com/tcnksm/ghr
after_success:
  # Cross compile go project
  - gox -os="linux darwin windows" -arch="386 amd64" -output "pkg/{{.Dir}}_{{.OS}}_{{.Arch}}" -ldflags="-X main.Version=`git describe --tags --match 'v*'`"
  # Verify compiled binaries
  - ./pkg/nv_linux_amd64 version
  # Create pre releases for every commits
  - ghr --username uetchy --replace --prerelease pre-release pkg/
deploy: # Deploy stable version if commmits have a tag such as 'v2.0.0'
  provider: releases
  api_key: $GITHUB_TOKEN
  file: "pkg/*"
  skip_cleanup: true
  on:
    tags: true

sudo: false
language: go
go:
  - tip
before_install:
  - go get -v github.com/mitchellh/gox
  - go get -v github.com/tcnksm/ghr
after_success:
  # Cross compile go project
  - gox -os="linux darwin windows" -arch="386 amd64" -output "pkg/{{.Dir}}_{{.OS}}_{{.Arch}}" -ldflags="-X main.Version=`git describe --tags --match 'v*'`"
  # Verify compiled binaries
  - ./pkg/nv_linux_amd64 --version
  # Create pre releases for every commits
  - ghr --username uetchy --replace --prerelease pre-release pkg/
deploy: # Deploy stable version if commmits have a tag such as 'v2.0.0'
  provider: releases
  api_key: $GITHUB_TOKEN
  file: "pkg/*"
  skip_cleanup: true
  on:
    tags: true

Use --version instead of version
Use --version instead of version
