Skip to content

Commit 40cff61

Browse files
committed
Compile binaries using circle-ci
1 parent 4538d4c commit 40cff61

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

circle.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
machine:
2+
pre:
3+
# Use newer golang version
4+
- sudo mv /usr/local/go /usr/local/go-1.6.2
5+
- wget -q -O /tmp/go1.7.3.tgz https://storage.googleapis.com/golang/go1.7.3.linux-amd64.tar.gz
6+
- sudo tar -xzf /tmp/go1.7.3.tgz -C /usr/local
7+
8+
checkout:
9+
post:
10+
- git fetch --tags && git tag
11+
12+
deployment:
13+
release:
14+
branch: master
15+
commands:
16+
- echo "-X main.Version=$(git describe --tags) -X main.BuildDate=$(date -u '+%Y/%m/%d-%H:%M:%S')"
17+
- go get github.com/mitchellh/gox
18+
- go get -u github.com/tcnksm/ghr
19+
- gox -ldflags "-X main.Version=$(git describe --tags) -X main.BuildDate=$(date -u '+%Y/%m/%d-%H:%M:%S')" -output "dist/ncd_{{.OS}}_{{.Arch}}"
20+
- ghr -t $GITHUB_TOKEN -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME --replace `git describe --tags` dist/

0 commit comments

Comments
 (0)