From 4907959c53c0c9e7f08742c54053d034e871b7be Mon Sep 17 00:00:00 2001 From: Conor McNamara Date: Tue, 1 Sep 2015 13:36:51 -0400 Subject: [PATCH] Add GitHub Release Uploading to Travis --- .gitignore | 1 + .travis.yml | 28 +++++++++++++++++++++------- Makefile | 13 +++++++++++++ 3 files changed, 35 insertions(+), 7 deletions(-) create mode 100644 Makefile diff --git a/.gitignore b/.gitignore index 093d0f5..414881b 100644 --- a/.gitignore +++ b/.gitignore @@ -26,4 +26,5 @@ _testmain.go # ghkeys-specific config.yml ghkeys +release result diff --git a/.travis.yml b/.travis.yml index eec1cfd..d700131 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,28 @@ language: go sudo: false go: - - 1.4.2 - - 1.5 - - tip + - 1.4.2 + - 1.5 + - tip before_install: - - go get github.com/axw/gocov/gocov - - go get github.com/mattn/goveralls - - if ! go get code.google.com/p/go.tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi + - go get github.com/axw/gocov/gocov + - go get github.com/mattn/goveralls + - if ! go get code.google.com/p/go.tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi +install: make install script: - - $HOME/gopath/bin/goveralls -service=travis-ci + - $HOME/gopath/bin/goveralls -service=travis-ci notifications: email: false +deploy: + provider: releases + api_key: + secure: aPoUmzlkPs5L8BHrEowO6PfypK8pe1+MZR8Pf3WWYT6MBmHsL0SCB4FW7TvGkHKFqJX/5M8cD7qCg2sgJS40nO9sk9RiQBEBY76MzXFVnvPRqVy+0PsHxY8TuFLz43gxyUXyz/WKbsFx7o+nuteZctzytTEReHQ21q7fCXGCXbw= + file: + - release/ghkeys-linux-amd64 + - release/ghkeys-linux-386 + - release/ghkeys-linux-arm + skip_cleanup: true + on: + repo: conortm/ghkeys + tags: true + go: 1.5 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b31409a --- /dev/null +++ b/Makefile @@ -0,0 +1,13 @@ +package = github.com/conortm/ghkeys + +.PHONY: install +.PHONY: release + +install: + go get -t -v ./... + +release: + mkdir -p release + GOOS=linux GOARCH=amd64 go build -o release/ghkeys-linux-amd64 $(package) + GOOS=linux GOARCH=386 go build -o release/ghkeys-linux-386 $(package) + GOOS=linux GOARCH=arm go build -o release/ghkeys-linux-arm $(package)