-
Notifications
You must be signed in to change notification settings - Fork 5
/
.drone.yml
83 lines (77 loc) · 1.32 KB
/
.drone.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
---
kind: pipeline
name: test
steps:
- name: fetch
image: docker:git
commands:
- git fetch --tags
- name: lint
image: golang
pull: always
depends_on:
- fetch
commands:
- find . -name "*.go" | xargs gofmt -s -d
#- go vet ./...
when:
event:
- push
- tag
- name: go-mod-vendor
image: golang
pull: always
depends_on:
- lint
commands:
- go mod vendor
when:
event:
- push
- name: build-linux-push
group: build
image: golang
pull: always
depends_on:
- go-mod-vendor
environment:
GOOS: linux
GOARCH: amd64
CGO_ENABLED: 0
commands:
- go build
when:
event:
- push
- name: build-darwin-push
group: build
image: golang
pull: always
depends_on:
- go-mod-vendor
environment:
GOOS: darwin
GOARCH: amd64
CGO_ENABLED: 0
commands:
- go build
when:
event:
- push
- name: build-release
image: goreleaser/goreleaser:v0.124
pull: always
depends_on:
- lint
- fetch
environment:
GITHUB_TOKEN:
from_secret: GITHUB_TOKEN
secrets:
- GITHUB_TOKEN
commands:
- goreleaser check
- goreleaser --debug
when:
event:
- tag