Release filename properly
parent
c96fa3bfab
commit
efee7656cc
18
.drone.yml
18
.drone.yml
|
@ -2,23 +2,19 @@ matrix:
|
||||||
GO_VERSION:
|
GO_VERSION:
|
||||||
- "1.10"
|
- "1.10"
|
||||||
GOOS:
|
GOOS:
|
||||||
- "windows"
|
- linux
|
||||||
- "linux"
|
- windows
|
||||||
- "darwin"
|
- darwin
|
||||||
GOARCH:
|
|
||||||
- "amd64"
|
|
||||||
pipeline:
|
pipeline:
|
||||||
build:
|
build:
|
||||||
image: golang:${GO_VERSION}
|
image: golang:${GO_VERSION}
|
||||||
environment:
|
|
||||||
- FILENAME=${DRONE_REPO_NAME}-${GOOS}-${GOARCH}
|
|
||||||
commands:
|
commands:
|
||||||
- go build -ldflags "-s -w" -o "${FILENAME/windows-amd64/windows-amd64.exe}"
|
- export FILENAME=${DRONE_REPO_NAME}-${GOOS}-${GOARCH}
|
||||||
|
- go build -ldflags "-s -w" -o dist/$FILENAME
|
||||||
release:
|
release:
|
||||||
image: plugins/github-release
|
image: plugins/github-release
|
||||||
secrets: [ github_token ]
|
secrets: [ github_token ]
|
||||||
environment:
|
files:
|
||||||
- FILENAME=${DRONE_REPO_NAME}-${GOOS}-${GOARCH}
|
- dist/*
|
||||||
files: [ "${FILENAME}" ]
|
|
||||||
when:
|
when:
|
||||||
event: tag
|
event: tag
|
||||||
|
|
Loading…
Reference in New Issue