From ebb81c322200f950f7a334bb04383876101e0e36 Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Sun, 30 Oct 2022 15:02:20 +0100 Subject: [PATCH] updated .drone.yml --- .drone.yml | 122 ++++++++++++++++++++--------------------------------- 1 file changed, 45 insertions(+), 77 deletions(-) diff --git a/.drone.yml b/.drone.yml index 8e124f6..06dcd40 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,20 +1,33 @@ --- kind: pipeline type: docker -name: build-linux-amd64 - -environment: - GOOS: linux - GOARCH: amd64 - GOOPTIONS: -mod=vendor - SRCFILES: cmd/qrz/*.go - PROJECTNAME: qrz +name: build-linux steps: - - name: build + - name: build-linux-amd64 image: golang commands: - go build -o $PROJECTNAME $GOOPTIONS $SRCFILES + environment: + GOOS: linux + GOARCH: amd64 + GOOPTIONS: -mod=vendor + SRCFILES: cmd/qrz/*.go + PROJECTNAME: qrz + when: + event: + exclude: + - tag + - name: build-linux-arm64 + image: golang + commands: + - go build -o $PROJECTNAME $GOOPTIONS $SRCFILES + environment: + GOOS: linux + GOARCH: arm64 + GOOPTIONS: -mod=vendor + SRCFILES: cmd/qrz/*.go + PROJECTNAME: qrz when: event: exclude: @@ -23,81 +36,36 @@ steps: --- kind: pipeline type: docker -name: build-linux-arm64 - -environment: - GOOS: linux - GOARCH: arm64 - GOOPTIONS: -mod=vendor - SRCFILES: cmd/qrz/*.go - PROJECTNAME: qrz +name: gitea-release-linux steps: - - name: build - image: golang - commands: - - go build -o $PROJECTNAME $GOOPTIONS $SRCFILES - when: - event: - exclude: - - tag - ---- -kind: pipeline -type: docker -name: gitea-release-linux-amd64 - -environment: - GOOS: linux - GOARCH: amd64 - GOOPTIONS: -mod=vendor -ldflags="-s -w" - SRCFILES: cmd/qrz/*.go - PROJECTNAME: qrz - -steps: - - name: build - image: golang - commands: - - go build -o $PROJECTNAME $GOOPTIONS $SRCFILES - - tar -czvf $PROJECTNAME-$DRONE_TAG-$GOOS-$GOARCH.tar.gz $PROJECTNAME - - echo $PROJECTNAME $DRONE_TAG > VERSION - when: - event: - - tag - - name: release - image: plugins/gitea-release - settings: - base_url: https://git.paulbsd.com - api_key: - from_secret: gitea_token - files: "*.tar.gz" - checksum: - - sha256 - - sha512 - title: VERSION - when: - event: - - tag - ---- -kind: pipeline -type: docker -name: gitea-release-linux-arm64 - -environment: - GOOS: linux - GOARCH: arm64 - GOOPTIONS: -mod=vendor -ldflags="-s -w" - SRCFILES: cmd/qrz/*.go - PROJECTNAME: qrz - -steps: - - name: build + - name: build-linux-amd64 image: golang commands: - go build -o $PROJECTNAME $GOOPTIONS $SRCFILES - tar -czvf $PROJECTNAME-$DRONE_TAG-$GOOS-$GOARCH.tar.gz $PROJECTNAME - echo $PROJECTNAME $DRONE_TAG > VERSION + environment: + GOOS: linux + GOARCH: amd64 + GOOPTIONS: -mod=vendor -ldflags="-s -w" + SRCFILES: cmd/qrz/*.go + PROJECTNAME: qrz + when: + event: + - tag + - name: build-linux-arm64 + image: golang + commands: + - go build -o $PROJECTNAME $GOOPTIONS $SRCFILES + - tar -czvf $PROJECTNAME-$DRONE_TAG-$GOOS-$GOARCH.tar.gz $PROJECTNAME + - echo $PROJECTNAME $DRONE_TAG > VERSION + environment: + GOOS: linux + GOARCH: arm64 + GOOPTIONS: -mod=vendor -ldflags="-s -w" + SRCFILES: cmd/qrz/*.go + PROJECTNAME: qrz when: event: - tag