go-check-plugins-artifacts/.drone.yml
Paul Lecuq 572f3203cf
Some checks reported errors
continuous-integration/drone/push Build is failing
continuous-integration/drone/tag Build was killed
updated .drone.yml
2020-05-21 21:39:10 +02:00

82 lines
1.6 KiB
YAML

---
kind: pipeline
type: docker
name: default
clone:
disable: true
steps:
- name: clone
image: alpine/git
commands:
- git clone https://github.com/mackerelio/go-check-plugins.git .
- git checkout $DRONE_TAG
when:
event: tag
- name: create_dir
image: alpine
commands:
- mkdir build
when:
event: tag
- name: build-linux-amd64
image: golang
commands:
- go build -o build/go-check-plugins-$GOOS-$GOARCH
environment:
GOOS: linux
GOARCH: amd64
when:
event: tag
- name: build-linux-arm64
image: golang
commands:
- go build -o build/go-check-plugins-$GOOS-$GOARCH
environment:
GOOS: linux
GOARCH: arm64
when:
event: tag
- name: build-linux-arm
image: golang
commands:
- go build -o build/go-check-plugins-$GOOS-$GOARCH
environment:
GOOS: linux
GOARCH: arm
when:
event: tag
- name: build-netbsd-amd64
image: golang
commands:
- go build -o build/go-check-plugins-$GOOS-$GOARCH
environment:
GOOS: netbsd
GOARCH: amd64
when:
event: tag
- name: create_archive
image: alpine
commands:
- cd build
- tar -czvf go-check-plugins-$DRONE_TAG.tar.gz *
when:
event: tag
- name: upload
image: plugins/s3
settings:
bucket: my
- name: release
image: plugins/gitea-release
settings:
base_url: https://git.paulbsd.com
api_key:
from_secret: gitea_token
files: "build/*.tar.gz"
checksum:
- sha256
- sha512
when:
event: tag