From 2305086940a41133e89d47d3b7bf9da9803d8d10 Mon Sep 17 00:00:00 2001 From: "Santiago M. Mola" Date: Fri, 11 May 2018 20:15:38 +0200 Subject: [PATCH] prepare for first release * pin to Go 1.9.x for builds. It seems we are affected by a Go 1.10.x regression: https://github.com/golang/go/issues/25042 * cross-compile binaries with mitchellh/gox. * add GitHub releases deployment from Travis. * README fixes. --- .travis.yml | 26 ++++++++++++++++++++++++++ README.md | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7c889c7..e72a3fc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ language: go +go: 1.9.x env: global: - CGO_ENABLED: 0 @@ -23,3 +24,28 @@ matrix: - {os: osx, osx_image: xcode9.3, env: 'POSTGRESQL_VERSION=9.6'} - {os: osx, osx_image: xcode9.3, env: 'POSTGRESQL_VERSION=10'} - {os: osx, osx_image: xcode9.3, env: 'RABBITMQ_VERSION=any'} +stages: + - test + - deploy +install: + - echo pass +script: + - go test -v ./... +jobs: + include: + - stage: deploy + os: linux + sudo: false + dist: trusty + if: tag IS present + script: + - go get github.com/mitchellh/gox + - CGO_ENABLED=0 gox -osarch="linux/amd64 darwin/amd64 windows/amd64" -ldflags="-s -w" + deploy: + provider: releases + api_key: $GITHUB_TOKEN + skip_cleanup: true + file_glob: true + file: ci-tricks_* + on: + tags: true diff --git a/README.md b/README.md index 61a4f1c..50ccd97 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ RabbitMQ can be set up by setting the `RABBITMQ_VERSION` environment variable to | Version | Travis/Linux | Travis/macOS | Appveyor/Windows | | ------------- |:-------------:|:------------:|:---------------------:| -| `any` | ✅ | ✅ | ❌ | +| `any` | ✅ | ✅ | ✅ | ## Contributing