Skip to content

Commit

Permalink
Merge pull request #2 from dbalan/deployment
Browse files Browse the repository at this point in the history
Create github release on tags.
  • Loading branch information
dbalan committed Mar 6, 2018
2 parents 9c3372c + 4284f30 commit 28729df
Showing 1 changed file with 39 additions and 3 deletions.
42 changes: 39 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,49 @@ jobs:
- deps-vendor
# specify any bash command here prefixed with `run: `
- run: ./dep ensure -v
- run: go get github.com/mitchellh/gox
- save_cache:
key: deps-vendor
paths:
- "vendor"

- run: go test -v ./...
- run: go build
- run: gox -output "dist/pipet_{{.OS}}_{{.Arch}}" -os "freebsd linux netbsd darwin" -arch "amd64 386 arm" -osarch "!darwin/arm"
- store_artifacts:
path: pipet
destination: pipet-amd64
path: dist
dest: dist
deploy:
docker:
- image: circleci/golang:1.10

working_directory: /go/src/github.com/dbalan/pipet
steps:
- checkout
- run: curl -L https://github.com/golang/dep/releases/download/v0.4.1/dep-linux-amd64 > dep
- run: chmod a+x dep
- restore_cache:
keys:
- deps-vendor
# specify any bash command here prefixed with `run: `
- run: ./dep ensure -v
- run: go get github.com/mitchellh/gox github.com/tcnksm/ghr
- save_cache:
key: deps-vendor
paths:
- "vendor"
- run: gox -output "dist/pipet_{{.OS}}_{{.Arch}}" -os "freebsd linux netbsd darwin" -arch "amd64 386 arm" -osarch "!darwin/arm"
- run: ghr -t $GITHUB_TOKEN -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME --replace $(git describe --tags) dist/



workflows:
version: 2
build-and-deploy:
jobs:
- build
- deploy:
requires:
- build
filters:
branches:
only: master

0 comments on commit 28729df

Please sign in to comment.