From 2c55dbdea309ad5d59825c2aab5ee5a3e9f36a17 Mon Sep 17 00:00:00 2001 From: lifei6671 Date: Mon, 8 May 2017 17:19:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0Travis=20CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..23dea07a --- /dev/null +++ b/.travis.yml @@ -0,0 +1,33 @@ +language: go + +go: + - 1.8 + +before_install: + - sudo apt-get -qq update + - go get -v -u ./... + - GOARCH=amd64 GOOS=linux go build -o godoc_linux_amd64 -ldflags="-w -X main.VERSION=$TAG -X 'main.BUILD_TIME=`date`' -X 'main.GO_VERSION=`go version`'" + - GOARCH=amd64 GOOS=darwin go build -o godoc_darwin_amd64 -ldflags="-w -X main.VERSION=$TAG -X 'main.BUILD_TIME=`date`' -X 'main.GO_VERSION=`go version`'" + - GOARCH=amd64 GOOS=windows go build -o godoc_windows_amd64 -ldflags="-w -X main.VERSION=$TAG -X 'main.BUILD_TIME=`date`' -X 'main.GO_VERSION=`go version`'" + - rm -rf commands controllers models modules routers tasks vendor docs search data utils graphics .git Godeps uploads/* .gitignore .travis.yml Dockerfile gide.yaml LICENSE main.go README.md conf/enumerate.go conf/mail.go install.lock *.md + - zip -r godoc_linux_amd64.zip conf logs static uploads views godoc_linux_amd64 + - zip -r godoc_darwin_amd64.zip conf logs static uploads views godoc_darwin_amd64 + - zip -r godoc_windows_amd64.zip conf logs static uploads views godoc_windows_amd64 + +deploy: + provider: releases + api_key: $CI_USER_TOKEN + skip_cleanup: true + file: + - godoc_linux_amd64.zip + - godoc_darwin_amd64.zip + - godoc_windows_amd64.zip + on: + overwrite: true + tags: true + all_branches: true + go: 1.8 + +env: + global: + - TAG: 0.1.2 \ No newline at end of file