-
Notifications
You must be signed in to change notification settings - Fork 15
/
.travis.yml
40 lines (33 loc) · 1.16 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
language: go
go:
- tip # The latest version of Go.
install: true
env:
global:
- MYAPP=tinyjpg
- MYEMAIL=dev@meetapp.io
- secure: ${GH_TOKEN}
before_install:
- sudo apt-get -qq update
install:
- go get -u github.com/OrlovEvgeny/TinyJPG
- cd $GOPATH/src/github.com/OrlovEvgeny/TinyJPG
- go install
script: echo "pass"
# build the app,build the package
before_deploy:
- mkdir -p build/{386,amd64}
- GOOS=linux GOARCH=386 go build --ldflags "-X main.version=${TRAVIS_TAG} -X main.build=${TRAVIS_BUILD_NUMBER} -X main.commit=${TRAVIS_COMMIT} -X main.docs=https://github.com/OrlovEvgeny/TinyJPG/blob/master/README.md" -o build/386/${MYAPP}-386 ./cmd/tinyjpg/main.go
- GOOS=linux GOARCH=amd64 go build --ldflags "-X main.version=${TRAVIS_TAG} -X main.build=${TRAVIS_BUILD_NUMBER} -X main.commit=${TRAVIS_COMMIT} -X main.docs=https://github.com/OrlovEvgeny/TinyJPG/blob/master/README.md" -o build/amd64/${MYAPP}-amd64 ./cmd/tinyjpg/main.go
deploy:
provider: releases
email: dev@meetapp.io
api_key:
secure: ${GH_TOKEN}
file:
- build/386/${MYAPP}-386
- build/amd64/${MYAPP}-amd64
skip_cleanup: true
on:
tags: true
all_branches: true