ow-api/.drone.yml

58 lines
1.4 KiB
YAML

kind: pipeline
name: default
steps:
- name: build
image: tystuyfzand/goc
group: build
volumes:
- name: build
path: /build
commands:
- GOOS=linux,windows GOARCH=386,arm,arm64,amd64 goc -o /build/owapi
- name: package
image: tystuyfzand/fpm
commands:
- export VERSION=`grep "Version" main.go | head -n 1 | awk '{print $3}' | sed -e 's/^"//' -e 's/"$//' | tr -d '\n'`
- echo "v$VERSION" > /build/version.txt
- chmod +x packaging/build-package.sh
- ARCH=386,amd64,arm,arm64 packaging/build-package.sh
volumes:
- name: build
path: /build
environment:
UPLOAD_URL:
from_secret: upload_url
- name: release
image: tystuyfzand/drone-gitea-release
volumes:
- name: build
path: /build
settings:
gitea_server: https://git.meow.tf
tag_file: /build/version.txt
title_file: /build/version.txt
files: [ '/build/owapi_*' ]
environment:
PLUGIN_API_KEY:
from_secret: gitea_token
- name: docker
image: plugins/docker
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: registry.meow.tf/ow-api/ow-api
registry: registry.meow.tf
tags:
- latest
volumes:
- name: build
temp: {}
trigger:
branch:
- master
event:
- push