1
0
Fork 0

Release filename properly

master
Ambrose Chua 2018-03-26 21:00:11 +08:00
parent c96fa3bfab
commit efee7656cc
1 changed files with 7 additions and 11 deletions

View File

@ -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