go-check-plugins-artifacts/.drone.yml

85 lines
1.6 KiB
YAML
Raw Permalink Normal View History

2020-05-21 21:12:02 +02:00
---
kind: pipeline
type: docker
2020-05-21 21:27:58 +02:00
name: default
2020-05-21 21:12:02 +02:00
clone:
disable: true
steps:
- name: clone
image: alpine/git
commands:
2020-06-07 22:23:10 +02:00
- git clone https://github.com/mackerelio/go-check-plugins.git .
2020-05-21 21:34:27 +02:00
- git checkout $DRONE_TAG
2020-05-21 21:27:58 +02:00
when:
event: tag
- name: create_dir
image: alpine
commands:
2020-06-07 21:57:25 +02:00
- mkdir bin
2020-05-21 21:27:58 +02:00
when:
event: tag
2020-05-21 21:28:39 +02:00
- name: build-linux-amd64
2020-05-21 21:12:02 +02:00
image: golang
commands:
2020-06-07 22:18:34 +02:00
- go build -o bin/go-check-plugins-$OS-$ARCH
2020-05-21 21:12:02 +02:00
environment:
GOOS: linux
GOARCH: amd64
2020-06-07 22:18:34 +02:00
OS: linux
ARCH: amd64
2020-05-21 21:27:58 +02:00
when:
event: tag
2020-05-21 21:28:39 +02:00
- name: build-linux-arm64
2020-05-21 21:27:58 +02:00
image: golang
commands:
2020-06-07 22:18:34 +02:00
- go build -o bin/go-check-plugins-$OS-$ARCH
2020-05-21 21:27:58 +02:00
environment:
GOOS: linux
GOARCH: arm64
2020-06-07 22:18:34 +02:00
OS: linux
ARCH: arm64
2020-05-21 21:27:58 +02:00
when:
event: tag
2020-05-21 21:28:39 +02:00
- name: build-linux-arm
2020-05-21 21:27:58 +02:00
image: golang
commands:
2020-06-07 22:18:34 +02:00
- go build -o bin/go-check-plugins-$OS-$ARCH
2020-05-21 21:27:58 +02:00
environment:
GOOS: linux
GOARCH: arm
2020-06-07 22:18:34 +02:00
OS: linux
ARCH: armhf
2020-05-21 21:27:58 +02:00
when:
event: tag
2020-05-21 21:28:39 +02:00
- name: build-netbsd-amd64
2020-05-21 21:27:58 +02:00
image: golang
commands:
2020-06-07 22:18:34 +02:00
- go build -o bin/go-check-plugins-$OS-$ARCH
2020-05-21 21:27:58 +02:00
environment:
GOOS: netbsd
GOARCH: amd64
2020-06-07 22:18:34 +02:00
OS: netbsd
ARCH: amd64
2020-05-21 21:27:58 +02:00
when:
event: tag
- name: create_archive
image: alpine
commands:
2020-06-07 21:57:25 +02:00
- tar -czvf go-check-plugins-$DRONE_TAG.tar.gz bin
2020-05-21 21:27:58 +02:00
when:
event: tag
2020-05-21 21:12:02 +02:00
- name: release
image: plugins/gitea-release
settings:
base_url: https://git.paulbsd.com
api_key:
from_secret: gitea_token
2020-06-07 21:57:25 +02:00
files: "*.tar.gz"
2020-05-21 21:12:02 +02:00
checksum:
- sha256
- sha512
when:
event: tag