Skip to content

Commit

Permalink
.drone.yml: Build binaries when branch tagged
Browse files Browse the repository at this point in the history
TODO: add test to Drone CI
  • Loading branch information
leiless committed Mar 17, 2020
1 parent 32119fb commit 19366de
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ steps:
- cd /go/src/github.com/coredns/coredns
- make
- mv coredns /go/src/github.com/leiless/dnsredir/bin/coredns_dnsredir-$GOOS-$GOARCH
when:
event: tag
- name: build-coredns-linux-arm64
image: golang
environment:
Expand All @@ -58,6 +60,8 @@ steps:
- cd /go/src/github.com/coredns/coredns
- make
- mv coredns /go/src/github.com/leiless/dnsredir/bin/coredns_dnsredir-$GOOS-$GOARCH
when:
event: tag
- name: build-coredns-darwin-amd64
image: golang
environment:
Expand All @@ -67,6 +71,8 @@ steps:
- cd /go/src/github.com/coredns/coredns
- make
- mv coredns /go/src/github.com/leiless/dnsredir/bin/coredns_dnsredir-$GOOS-$GOARCH
when:
event: tag
- name: build-coredns-windows-amd64
image: golang
environment:
Expand All @@ -76,16 +82,25 @@ steps:
- cd /go/src/github.com/coredns/coredns
- make
- mv coredns /go/src/github.com/leiless/dnsredir/bin/coredns_dnsredir-$GOOS-$GOARCH.exe
when:
event: tag
- name: calc-shasum256
image: alpine
commands:
- uname -a
- cd /go/src/github.com/leiless/dnsredir/bin
- ls -l coredns*
- sha256sum coredns* | tee shasum256.txt
- name: publish
when:
event: tag
- name: github-release
image: plugins/github-release
settings:
api_key:
from_secret: github_token
files: bin/coredns*
files:
- bin/coredns*
- bin/shasum256.txt
when:
event: tag

0 comments on commit 19366de

Please sign in to comment.