You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
564 B

workspace:
base: /go
matrix:
GO_VERSION:
- "1.11"
GOOS:
- linux
- windows
- darwin
GOARCH:
- amd64
pipeline:
build:
image: golang:${GO_VERSION}
pull: true
environment:
- CGO_ENABLED=0
commands:
- export FILENAME=${DRONE_REPO_NAME}-${GOOS}-${GOARCH}
- if [ "$GOOS" = "windows" ]; then export FILENAME=$FILENAME.exe; fi
- go build -ldflags "-s -w" -o dist/$FILENAME
release:
image: plugins/github-release
secrets: [ github_token ]
files:
- dist/*
when:
event: tag