cli/.drone.yml

56 lines
1.2 KiB
YAML
Raw Normal View History

2021-03-27 03:47:13 +00:00
kind: pipeline
name: default
type: docker
2021-03-27 03:47:13 +00:00
steps:
- name: build
image: tystuyfzand/goc:latest
2021-03-27 03:47:13 +00:00
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
2021-03-27 03:47:13 +00:00
environment:
API_KEY:
from_secret: api_key
GOOS: linux,windows,darwin,openbsd,freebsd
GOARCH: 386,amd64,arm,arm64
2021-03-27 04:54:08 +00:00
- name: package
image: tystuyfzand/fpm
commands:
- chmod +x scripts/build-package.sh
- ARCH=386 scripts/build-package.sh
2021-03-27 04:54:08 +00:00
- ARCH=amd64 scripts/build-package.sh
- ARCH=arm scripts/build-package.sh
2021-03-27 04:54:08 +00:00
- ARCH=arm64 scripts/build-package.sh
volumes:
- name: build
path: /build
when:
event: tag
2021-03-27 03:47:13 +00:00
- name: release
image: plugins/gitea-release
volumes:
- name: build
path: /build
settings:
api_key:
from_secret: gitea_token
2021-03-27 03:51:28 +00:00
base_url: https://git.meow.tf
2021-03-27 03:55:54 +00:00
title: release
2021-03-27 03:47:13 +00:00
files:
- /build/pastee_*
2021-03-27 03:55:54 +00:00
checksum:
- md5
- sha1
- sha256
2021-03-27 03:47:13 +00:00
environment:
PLUGIN_API_KEY:
from_secret: gitea_token
when:
2021-03-27 03:51:28 +00:00
event: tag
volumes:
- name: build
temp: {}