dip/.drone.yml
Paul Lecuq cfcb9d9387
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
updated .drone.yml
2022-10-30 15:31:52 +01:00

82 lines
1.6 KiB
YAML

---
kind: pipeline
type: docker
name: build-linux
environment:
GOOS: linux
GOOPTIONS: -mod=vendor
SRCFILES: cmd/dip/*.go
PROJECTNAME: dip
steps:
- name: build-linux-amd64
image: golang
commands:
- go build -o $PROJECTNAME $GOOPTIONS $SRCFILES
environment:
GOARCH: amd64
when:
event:
exclude:
- tag
- name: build-linux-arm64
image: golang
commands:
- go build -o $PROJECTNAME $GOOPTIONS $SRCFILES
environment:
GOARCH: arm64
when:
event:
exclude:
- tag
---
kind: pipeline
type: docker
name: gitea-release-linux
environment:
GOOS: linux
GOOPTIONS: -mod=vendor
SRCFILES: cmd/dip/*.go
PROJECTNAME: dip
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:
GOARCH: amd64
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:
GOARCH: arm64
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