-
Notifications
You must be signed in to change notification settings - Fork 1
/
circle.yml
36 lines (33 loc) · 1.55 KB
/
circle.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
machine:
timezone:
Asia/Tokyo
test:
pre:
- go get github.com/mattn/gom
- gom install
- go get github.com/axw/gocov/gocov
- go get github.com/mattn/goveralls
- if ! go get github.com/golang/tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi
override:
- go test -v -cover -race -coverprofile=./coverage.out
post:
- goveralls -coverprofile=./coverage.out -service=circle-ci -repotoken=$COVERALLS_TOKEN
deployment:
deployment:
branch: develop
commands:
- go get github.com/mitchellh/gox
- go get github.com/tcnksm/ghr
- gom exec gox --osarch "windows/386 windows/amd64" --output "dist/{{.Dir}}_{{.OS}}_{{.Arch}}" ./gotoml
- gom exec gox --osarch "linux/386 linux/amd64" --output "dist/{{.Dir}}_{{.OS}}_{{.Arch}}" ./gotoml
- gom exec gox --osarch "darwin/386 darwin/amd64" --output "dist/{{.Dir}}_{{.OS}}_{{.Arch}}" ./gotoml
- ghr -t $GITHUB_TOKEN -u $USERNAME -r $CIRCLE_PROJECT_REPONAME --replace --delete --prerelease `cat release_tag` dist/
master:
branch: master
commands:
- go get github.com/mitchellh/gox
- go get github.com/tcnksm/ghr
- gom exec gox --osarch "windows/386 windows/amd64" --output "dist/{{.Dir}}_{{.OS}}_{{.Arch}}" ./gotoml
- gom exec gox --osarch "linux/386 linux/amd64" --output "dist/{{.Dir}}_{{.OS}}_{{.Arch}}" ./gotoml
- gom exec gox --osarch "darwin/386 darwin/amd64" --output "dist/{{.Dir}}_{{.OS}}_{{.Arch}}" ./gotoml
- ghr -t $GITHUB_TOKEN -u $USERNAME -r $CIRCLE_PROJECT_REPONAME --replace `cat release_tag` dist/