-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
51 lines (47 loc) · 1.26 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
version: 2
jobs:
build:
docker:
# CircleCI Go images available at: https://hub.docker.com/r/circleci/golang/
- image: circleci/golang:1.9
working_directory: /go/src/github.com/zcong1993/tinyimg
steps:
- checkout
- run:
name: get deps
command: |
go get -u -v github.com/golang/dep/cmd/dep
dep ensure
go get -u -v github.com/mitchellh/gox
- run:
name: build
command: |
chmod +x ./build.sh
make build
deploy:
docker:
# CircleCI Go images available at: https://hub.docker.com/r/circleci/golang/
- image: circleci/golang:1.9
working_directory: /go/src/github.com/zcong1993/tinyimg
steps:
- run:
name: deployment
commands: |
go get github.com/tcnksm/ghr
ghr -t $GITHUB_TOKEN -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME --replace `git describe --tags` bin/
workflows:
version: 2
build-n-deploy:
jobs:
- build:
filters:
branches:
only: /.*/
- deploy:
requires:
- build
filters:
tags:
only: /^v/
branches:
only: master