qrz/.drone.yml
Paul Lecuq b155f72b02
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
removed checksums from .drone.yml
2023-07-13 00:43:45 +02:00

83 lines
1.8 KiB
YAML

---
kind: pipeline
type: docker
name: build-linux
steps:
- 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:
- 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:
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:
GOOS: linux
GOARCH: arm64
GOOPTIONS: -mod=vendor
SRCFILES: cmd/qrz/*.go
PROJECTNAME: qrz
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"
title: VERSION
when:
event:
- tag