1
0
Fork 0
forward/.drone.yml

31 lines
564 B
YAML
Raw Normal View History

2018-03-26 22:00:02 +08:00
workspace:
base: /go
2018-03-26 20:23:28 +08:00
matrix:
GO_VERSION:
2018-09-22 18:12:23 +08:00
- "1.11"
2018-03-26 20:23:28 +08:00
GOOS:
2018-03-26 21:00:11 +08:00
- linux
2018-03-26 22:00:02 +08:00
- windows
- darwin
2018-03-26 21:19:35 +08:00
GOARCH:
- amd64
2018-03-26 22:00:02 +08:00
2018-03-26 20:23:28 +08:00
pipeline:
build:
2018-03-26 21:51:56 +08:00
image: golang:${GO_VERSION}
2018-03-26 21:25:44 +08:00
pull: true
2018-05-06 14:21:49 +08:00
environment:
- CGO_ENABLED=0
2018-03-26 20:23:28 +08:00
commands:
2018-03-26 21:00:11 +08:00
- export FILENAME=${DRONE_REPO_NAME}-${GOOS}-${GOARCH}
2018-03-26 22:12:42 +08:00
- if [ "$GOOS" = "windows" ]; then export FILENAME=$FILENAME.exe; fi
2018-03-26 21:00:11 +08:00
- go build -ldflags "-s -w" -o dist/$FILENAME
2018-03-26 20:23:28 +08:00
release:
image: plugins/github-release
secrets: [ github_token ]
2018-03-26 21:00:11 +08:00
files:
- dist/*
2018-03-26 20:23:28 +08:00
when:
event: tag