From 316da3abc3cb0b44b977bce36cf3494fa40522ff Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Thu, 21 May 2020 21:27:58 +0200 Subject: [PATCH] updated .drone.yml --- .drone.yml | 50 +++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 3a788b2..87a207c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,7 +1,7 @@ --- kind: pipeline type: docker -name: default-linux-amd64 +name: default clone: disable: true @@ -11,20 +11,64 @@ steps: image: alpine/git commands: - git clone https://github.com/mackerelio/go-check-plugins.git . + when: + event: tag + - name: create_dir + image: alpine + commands: + - mkdir build + when: + event: tag - name: build image: golang commands: - - go build -o go-check-plugins-$DRONE_TAG-$GOOS-$GOARCH + - go build -o build/go-check-plugins-$DRONE_TAG-$GOOS-$GOARCH environment: GOOS: linux GOARCH: amd64 + when: + event: tag + - name: build + image: golang + commands: + - go build -o build/go-check-plugins-$DRONE_TAG-$GOOS-$GOARCH + environment: + GOOS: linux + GOARCH: arm64 + when: + event: tag + - name: build + image: golang + commands: + - go build -o build/go-check-plugins-$DRONE_TAG-$GOOS-$GOARCH + environment: + GOOS: linux + GOARCH: arm + when: + event: tag + - name: build + image: golang + commands: + - go build -o build/go-check-plugins-$DRONE_TAG-$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: release image: plugins/gitea-release settings: base_url: https://git.paulbsd.com api_key: from_secret: gitea_token - files: "go-check-plugins-$GOOS-$GOARCH" + files: "build/*" checksum: - sha256 - sha512