deb-simple/.drone.yml

43 lines
1.2 KiB
YAML
Raw Permalink Normal View History

2020-06-14 08:29:16 +00:00
kind: pipeline
name: default
2018-10-14 08:02:23 +00:00
2020-06-14 08:29:16 +00:00
steps:
- name: build
2018-10-14 08:08:44 +00:00
image: golang:latest
group: build
commands:
2020-06-14 08:34:50 +00:00
- mkdir -p /build/i386
2020-06-14 08:29:16 +00:00
- GOOS=linux GOARCH=386 go build -o /build/i386/deb-simple
- GOOS=linux GOARCH=amd64 go build -o /build/amd64/deb-simple
- GOOS=linux GOARCH=arm GOARM=7 go build -o /build/armv7/deb-simple
- GOOS=linux GOARCH=arm64 go build -o /build/arm64/deb-simple
2020-06-14 08:36:20 +00:00
volumes:
- name: build
path: /build
2020-06-14 08:33:48 +00:00
- name: package
2018-10-14 08:23:44 +00:00
image: tystuyfzand/fpm
commands:
2018-10-14 08:40:05 +00:00
- export VERSION=`grep "VERSION" server.go | head -n 1 | awk '{print $4}' | sed -e 's/^"//' -e 's/"$//' | tr -d '\n'`
2018-10-14 08:23:44 +00:00
- chmod +x packaging/build-package.sh packaging/package-upload.sh
- ARCH=i386 packaging/build-package.sh
- ARCH=amd64 packaging/build-package.sh
- ARCH=armv7 packaging/build-package.sh
- ARCH=arm64 packaging/build-package.sh
2020-06-14 08:36:20 +00:00
volumes:
- name: build
path: /build
2020-06-14 08:33:48 +00:00
- name: repo
image: tystuyfzand/drone-deb-simple
volumes:
- name: build
path: /build
settings:
url:
from_secret: upload_url
key:
from_secret: upload_key
files: [ '/build/*/deb-simple_*.deb' ]
2020-06-14 08:29:16 +00:00
volumes:
- name: build
temp: {}