Skip to content

Commit 19366de

Browse files
committed
.drone.yml: Build binaries when branch tagged
TODO: add test to Drone CI
1 parent 32119fb commit 19366de

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

.drone.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ steps:
4949
- cd /go/src/github.com/coredns/coredns
5050
- make
5151
- mv coredns /go/src/github.com/leiless/dnsredir/bin/coredns_dnsredir-$GOOS-$GOARCH
52+
when:
53+
event: tag
5254
- name: build-coredns-linux-arm64
5355
image: golang
5456
environment:
@@ -58,6 +60,8 @@ steps:
5860
- cd /go/src/github.com/coredns/coredns
5961
- make
6062
- mv coredns /go/src/github.com/leiless/dnsredir/bin/coredns_dnsredir-$GOOS-$GOARCH
63+
when:
64+
event: tag
6165
- name: build-coredns-darwin-amd64
6266
image: golang
6367
environment:
@@ -67,6 +71,8 @@ steps:
6771
- cd /go/src/github.com/coredns/coredns
6872
- make
6973
- mv coredns /go/src/github.com/leiless/dnsredir/bin/coredns_dnsredir-$GOOS-$GOARCH
74+
when:
75+
event: tag
7076
- name: build-coredns-windows-amd64
7177
image: golang
7278
environment:
@@ -76,16 +82,25 @@ steps:
7682
- cd /go/src/github.com/coredns/coredns
7783
- make
7884
- mv coredns /go/src/github.com/leiless/dnsredir/bin/coredns_dnsredir-$GOOS-$GOARCH.exe
85+
when:
86+
event: tag
7987
- name: calc-shasum256
8088
image: alpine
8189
commands:
8290
- uname -a
8391
- cd /go/src/github.com/leiless/dnsredir/bin
92+
- ls -l coredns*
8493
- sha256sum coredns* | tee shasum256.txt
85-
- name: publish
94+
when:
95+
event: tag
96+
- name: github-release
8697
image: plugins/github-release
8798
settings:
8899
api_key:
89100
from_secret: github_token
90-
files: bin/coredns*
101+
files:
102+
- bin/coredns*
103+
- bin/shasum256.txt
104+
when:
105+
event: tag
91106

0 commit comments

Comments
 (0)