streamdeck-remote/.drone.yml

41 lines
1.4 KiB
YAML
Raw Normal View History

2019-05-22 02:18:23 +00:00
kind: pipeline
name: default
steps:
- name: binary
volumes:
- name: cache
path: /tmp/build
image: golang
commands:
- GOOS=windows GOARCH=amd64 go build -o /tmp/build/remote.exe
- GOOS=darwin GOARCH=amd64 go build -o /tmp/build/remote
- name: package
volumes:
- name: cache
path: /tmp/build
image: alpine:latest
commands:
2019-05-22 02:34:21 +00:00
- apk add --update zip jq
2019-05-22 02:18:23 +00:00
- cp /tmp/build/remote.exe /tmp/build/remote plugin/
- cat plugin/manifest.json | jq -r '.Version' > /tmp/build/version.txt
- mv plugin tf.meow.remote.sdPlugin
2019-05-22 02:39:22 +00:00
- cd tf.meow.remote.sdPlugin
- zip -r /tmp/build/tf.meow.remote.streamDeckPlugin .
2019-05-22 03:44:26 +00:00
- name: release
2019-05-22 02:18:23 +00:00
volumes:
- name: cache
path: /tmp/build
2019-05-22 03:44:26 +00:00
image: alpine:latest
environment:
TOKEN:
2019-05-22 02:18:23 +00:00
from_secret: gitea_token
2019-05-22 03:44:26 +00:00
commands:
- apk add --update curl
- export VERSION=`cat /tmp/build/version.txt`
2019-05-22 03:46:55 +00:00
- echo "Request:"
- echo "server=https://git.meow.tf&token=$TOKEN&repo=$DRONE_REPO&name=$VERSION&tag_name=v$VERSION&commit=DRONE_COMMIT&assets[]=@/tmp/build/tf.meow.remote.streamDeckPlugin"
- curl -F "server=https://git.meow.tf&token=$TOKEN&repo=$DRONE_REPO&name=$VERSION&tag_name=v$VERSION&commit=DRONE_COMMIT&assets[]=@/tmp/build/tf.meow.remote.streamDeckPlugin" https://api.meow.tf/gitea/release/publish
2019-05-22 02:18:23 +00:00
volumes:
- name: cache
temp: {}