cli/.drone.yml

56 lines
1.2 KiB
YAML

kind: pipeline
name: default
type: docker
steps:
- name: build
image: tystuyfzand/goc:latest
volumes:
- name: build
path: /build
commands:
- mkdir -p /build
- go mod download
- goc -ldflags="-X 'paste.ee/cli/cmd.Key=$API_KEY'" -o /build/pastee
environment:
API_KEY:
from_secret: api_key
GOOS: linux,windows,darwin,openbsd,freebsd
GOARCH: 386,amd64,arm,arm64
- name: package
image: tystuyfzand/fpm
commands:
- chmod +x scripts/build-package.sh
- ARCH=386 scripts/build-package.sh
- ARCH=amd64 scripts/build-package.sh
- ARCH=arm scripts/build-package.sh
- ARCH=arm64 scripts/build-package.sh
volumes:
- name: build
path: /build
when:
event: tag
- name: release
image: plugins/gitea-release
volumes:
- name: build
path: /build
settings:
api_key:
from_secret: gitea_token
base_url: https://git.meow.tf
title: release
files:
- /build/pastee_*
checksum:
- md5
- sha1
- sha256
environment:
PLUGIN_API_KEY:
from_secret: gitea_token
when:
event: tag
volumes:
- name: build
temp: {}