forked from pottava/aws-s3-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
49 lines (48 loc) · 1.5 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
version: 2
jobs:
test:
working_directory: /go/src/github.com/pottava/aws-s3-proxy
docker:
- image: circleci/golang:1.11.4
steps:
- checkout
- run: go get -u github.com/golang/dep/...
- run: dep ensure
- run: curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.12.5
- run:
name: Run tests
command: |
./bin/golangci-lint run --config .golangci.yml
go test -cover -bench -benchmem $(go list ./...)
build:
working_directory: /go/src/github.com/pottava/aws-s3-proxy
docker:
- image: circleci/golang:1.11.4
steps:
- checkout
- run: go get -u github.com/golang/dep/...
- run: dep ensure
- run: go get github.com/mitchellh/gox
- run: go get github.com/tcnksm/ghr
- run:
name: Build and release
command: |
mkdir artifacts
gox --osarch "linux/amd64 darwin/amd64 windows/amd64" -ldflags "-s -w -X main.date=$(date +%Y-%m-%d --utc) -X main.version=${CIRCLE_TAG}" -output "./artifacts/{{.OS}}_{{.Arch}}"
ghr -t $GITHUB_TOKEN -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME --replace ${CIRCLE_TAG} ./artifacts/
workflows:
version: 2
dev:
jobs:
- test:
filters:
branches:
only: /.*/
release:
jobs:
- build:
filters:
branches:
ignore: /.*/
tags:
only: /v[0-9]+(\.[0-9]+)*/