Skip to content

Commit

Permalink
gorelease with circle
Browse files Browse the repository at this point in the history
  • Loading branch information
lingrino committed Jun 3, 2018
1 parent 42fea56 commit 04922d4
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 25 deletions.
67 changes: 43 additions & 24 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,45 @@
version: 2
jobs:
build:
docker:
- image: circleci/golang:1.10.1
- image: vault:0.10.1
environment:
SKIP_SETCAP: true
VAULT_DEV_ROOT_TOKEN_ID: hunter2
VAULT_DEV_LISTEN_ADDRESS: 0.0.0.0:8300
parallelism: 4
working_directory: /go/src/github.com/Lingrino/vaku
steps:
- checkout
- run:
name: Make sure there's nothing to go fmt
command: test -z $(gofmt -l -w -s vaku/)
- run:
name: Install dep
command: go get -u github.com/golang/dep/cmd/dep
- run:
name: Get Packages
command: dep ensure
- run:
name: Run Tests
command: go test -cover -v ./...
build:
docker:
- image: circleci/golang:1.10.1
- image: vault:0.10.1
environment:
SKIP_SETCAP: true
VAULT_DEV_ROOT_TOKEN_ID: hunter2
VAULT_DEV_LISTEN_ADDRESS: 0.0.0.0:8300
parallelism: 4
working_directory: /go/src/github.com/Lingrino/vaku
steps:
- checkout
- run:
name: Make sure there's nothing to go fmt
command: test -z $(gofmt -l -w -s vaku/)
- run:
name: Install dep
command: go get -u github.com/golang/dep/cmd/dep
- run:
name: Get Packages
command: dep ensure
- run:
name: Run Tests
command: go test -cover -v ./...
deploy:
working_directory: /go/src/github.com/Lingrino/vaku
steps:
- checkout
- run:
name: Build and deploy a new version
command: curl -sL https://git.io/goreleaser | bash

workflows:
version: 2
build-and-deploy:
jobs:
- build
- deploy:
requires:
- build
filters:
tags:
only: /v[0-9]+(\.[0-9]+)*(-.*)*/
7 changes: 6 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ builds:
- linux
goarch:
- amd64

changelog:
sort: asc
filters:
exclude:
- Merge pull request
- Merge branch
git:
short_hash: true

0 comments on commit 04922d4

Please sign in to comment.