qrz/.drone.yml
Paul Lecuq 08c6d20559
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
updated .drone.yml
2024-09-03 20:33:39 +02:00

110 lines
2.1 KiB
YAML

---
kind: pipeline
type: docker
name: build-linux-amd64
platform:
os: linux
arch: amd64
steps:
- name: build
image: golang
commands:
- go build -o $PROJECTNAME $GOOPTIONS $SRCFILES
environment:
CGO_ENABLED: 1
GOOS: linux
GOARCH: amd64
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: 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
api_key:
from_secret: gitea_token
files: "*.tar.gz"
title: VERSION
when:
event:
- tag