2020-04-06 23:31:26 +02:00
|
|
|
---
|
|
|
|
kind: pipeline
|
2020-04-07 23:03:53 +02:00
|
|
|
type: docker
|
|
|
|
name: default-linux-amd64
|
|
|
|
|
|
|
|
platform:
|
|
|
|
arch: amd64
|
|
|
|
os: linux
|
2020-04-06 23:31:26 +02:00
|
|
|
|
|
|
|
steps:
|
2020-04-07 23:03:53 +02:00
|
|
|
- name: build
|
2020-04-06 23:31:26 +02:00
|
|
|
image: golang
|
|
|
|
commands:
|
2020-04-07 00:20:03 +02:00
|
|
|
- mkdir dist
|
2020-04-07 23:03:53 +02:00
|
|
|
- go build -o dist/qrz-${DRONE_TAG}-${GOOS}-${GOARCH} -mod=vendor -ldflags="-s -w" cmd/qrz/*.go
|
|
|
|
- cd dist
|
|
|
|
- tar -czvf qrz-${DRONE_TAG}-${GOOS}-${GOARCH}.tar.gz
|
2020-04-07 00:20:03 +02:00
|
|
|
environment:
|
2020-04-07 23:12:58 +02:00
|
|
|
- GOOS=linux
|
|
|
|
- GOARCH=amd64
|
2020-04-07 23:03:53 +02:00
|
|
|
when:
|
|
|
|
event: tag
|
2020-04-07 00:20:03 +02:00
|
|
|
- name: release
|
|
|
|
image: plugins/gitea-release
|
|
|
|
settings:
|
|
|
|
base_url: https://git.paulbsd.com
|
|
|
|
api_key:
|
|
|
|
from_secret: gitea_token
|
2020-04-07 23:03:53 +02:00
|
|
|
files: dist/*.tar.gz
|
2020-04-07 00:21:25 +02:00
|
|
|
when:
|
|
|
|
event: tag
|