diff --git a/.travis.yml b/.travis.yml index 7f2aca0..897a63a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,14 @@ matrix: script: - make get-tools - make test - after_success: - bash <(curl -s https://codecov.io/bash) +before_deploy: + - make package +deploy: + provider: releases + api_key: "$GITHUB_TOKEN" + file: "inflight-$TRAVIS_TAG.tar.gz" + skip_cleanup: true + on: + tags: true diff --git a/Makefile b/Makefile index 4159135..6a2d9c3 100644 --- a/Makefile +++ b/Makefile @@ -5,4 +5,10 @@ get-tools: test: @echo 'run `make get-tools` if you are unable to run this test`' - @go test ./... -race -coverprofile=coverage.txt -covermode=atomic \ No newline at end of file + @go test ./... -race -coverprofile=coverage.txt -covermode=atomic + +package: + @echo "+ $@: building tarball" + @cd ../ ; \ + tar -pczf "inflight-${TRAVIS_TAG}.tar.gz" --exclude "inflight/.git" inflight ; \ + mv "inflight-${TRAVIS_TAG}.tar.gz" inflight \ No newline at end of file