From 08c6d205594ffb4d4a2e7c44b0559561ad8b8156 Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Tue, 3 Sep 2024 20:33:39 +0200 Subject: [PATCH] updated .drone.yml --- .drone.yml | 133 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 78 insertions(+), 55 deletions(-) diff --git a/.drone.yml b/.drone.yml index b1e9438..21b3eb2 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,10 +1,14 @@ --- kind: pipeline type: docker -name: build-linux +name: build-linux-amd64 + +platform: + os: linux + arch: amd64 steps: - - name: build-linux-amd64 + - name: build image: golang commands: - go build -o $PROJECTNAME $GOOPTIONS $SRCFILES @@ -19,61 +23,80 @@ steps: event: exclude: - tag - - name: build-linux-arm64 - image: golang - commands: - - go build -o $PROJECTNAME $GOOPTIONS $SRCFILES - environment: - CGO_ENABLED: 1 - GOOS: linux - GOARCH: arm64 - GOOPTIONS: -mod=vendor - SRCFILES: cmd/qrz/*.go - PROJECTNAME: qrz - when: - event: - exclude: - - tag ---- -kind: pipeline -type: docker -name: gitea-release-linux - -steps: - - 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: - CGO_ENABLED: 1 - GOOS: linux - GOARCH: amd64 - GOOPTIONS: -mod=vendor - 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: - CGO_ENABLED: 1 - GOOS: linux - GOARCH: arm64 - GOOPTIONS: -mod=vendor - SRCFILES: cmd/qrz/*.go - PROJECTNAME: qrz - when: - event: - - tag - name: release + 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: + CGO_ENABLED: 1 + GOOS: linux + GOARCH: amd64 + GOOPTIONS: -mod=vendor + SRCFILES: cmd/qrz/*.go + PROJECTNAME: qrz + when: + event: + - tag + + - name: publish + image: plugins/gitea-release + settings: + base_url: https://git.paulbsd.com + api_key: + from_secret: gitea_token + files: "*.tar.gz" + title: VERSION + when: + event: + - tag + +--- +kind: pipeline +type: docker +name: build-linux-arm64 + +platform: + os: linux + arch: arm64 + +steps: + - name: build + image: golang + commands: + - go build -o $PROJECTNAME $GOOPTIONS $SRCFILES + environment: + CGO_ENABLED: 1 + GOOS: linux + GOARCH: arm64 + GOOPTIONS: -mod=vendor + SRCFILES: cmd/qrz/*.go + PROJECTNAME: qrz + when: + event: + exclude: + - tag + + - name: release + 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: + CGO_ENABLED: 1 + GOOS: linux + GOARCH: arm64 + GOOPTIONS: -mod=vendor + SRCFILES: cmd/qrz/*.go + PROJECTNAME: qrz + when: + event: + - tag + + - name: publish image: plugins/gitea-release settings: base_url: https://git.paulbsd.com