cli/.drone.yml

60 lines
2.0 KiB
YAML
Raw Normal View History

2021-03-27 03:47:13 +00:00
kind: pipeline
name: default
steps:
- name: build
image: golang:latest
group: build
volumes:
- name: build
path: /build
commands:
- mkdir -p /build
2021-03-27 04:07:32 +00:00
- GOOS=linux GOARCH=386 go build -ldflags="-X 'paste.ee/cli/cmd.Key=$API_KEY'" -o /build/pastee_linux_i386
- GOOS=linux GOARCH=amd64 go build -ldflags="-X 'paste.ee/cli/cmd.Key=$API_KEY'" -o /build/pastee_linux_amd64
- GOOS=linux GOARCH=arm GOARM=7 go build -ldflags="-X 'paste.ee/cli/cmd.Key=$API_KEY'" -o /build/pastee_linux_armv7
- GOOS=linux GOARCH=arm64 go build -ldflags="-X 'paste.ee/cli/cmd.Key=$API_KEY'" -o /build/pastee_linux_arm64
- GOOS=windows GOARCH=386 go build -ldflags="-X 'paste.ee/cli/cmd.Key=$API_KEY'" -o /build/pastee_windows_i386.exe
- GOOS=windows GOARCH=amd64 go build -ldflags="-X 'paste.ee/cli/cmd.Key=$API_KEY'" -o /build/pastee_windows_amd64.exe
- GOOS=darwin GOARCH=arm64 go build -ldflags="-X 'paste.ee/cli/cmd.Key=$API_KEY'" -o /build/pastee_macos_arm64
- GOOS=darwin GOARCH=amd64 go build -ldflags="-X 'paste.ee/cli/cmd.Key=$API_KEY'" -o /build/pastee_macos_amd64
2021-03-27 03:47:13 +00:00
environment:
API_KEY:
from_secret: api_key
2021-03-27 04:54:08 +00:00
- name: package
image: tystuyfzand/fpm
commands:
- chmod +x scripts/build-package.sh
- ARCH=i386 scripts/build-package.sh
- ARCH=amd64 scripts/build-package.sh
- ARCH=armv7 scripts/build-package.sh
- 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: {}