-
-
Notifications
You must be signed in to change notification settings - Fork 23
/
.drone.yml
99 lines (89 loc) · 2.96 KB
/
.drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
---
kind: pipeline
type: docker
name: test
steps:
- name: modules
image: garykim/personal-tools-image:latest
commands:
- npm ci > /dev/null
- git submodule update --init --recursive
- name: eslint
image: garykim/personal-tools-image:latest
commands:
- npm run eslint
- name: php-lint
image: garykim/personal-tools-image:latest
commands:
- composer i > /dev/null 2>&1
- composer run lint
- composer run cs:check
- name: test-js-build
image: garykim/personal-tools-image:latest
commands:
- NODE_ENV=production npx webpack
- name: test-full-build
image: garykim/personal-tools-image:latest
pull: always
commands:
- npm ci > /dev/null
- make > /tmp/log.txt 2>&1 || (cat /tmp/log.txt && exit 1)
trigger:
branch:
- master
- stable*
event:
- pull_request
- push
---
kind: pipeline
type: docker
name: release
steps:
- name: build
image: garykim/personal-tools-image:latest
pull: always
commands:
- krankerl package --shipped
- name: integrity-sign
image: nextcloudci/server:latest
environment:
PRIVATE_KEY:
from_secret: signing_private_key
commands:
- mkdir -p $HOME/.nextcloud/certificates
- curl --output $HOME/.nextcloud/certificates/riotchat.crt -L https://raw.githubusercontent.com/nextcloud/app-certificate-requests/master/riotchat/riotchat.crt
- echo $PRIVATE_KEY > $HOME/.nextcloud/certificates/riotchat.key
- php /var/www/html/occ integrity:sign-app --privateKey="$HOME/.nextcloud/certificates/riotchat.key" --certificate="$HOME/.nextcloud/certificates/riotchat.crt" --path="$(pwd)/build/artifacts/riotchat"
- name: package
image: garykim/personal-tools-image:latest
pull: always
environment:
GITHUB_USER: gary-kim
GITHUB_TOKEN:
from_secret: github_token
commands:
- (cd build/artifacts && tar -czf riotchat.tar.gz riotchat)
- echo -en "$DRONE_TAG\n\n[See changelog here](https://github.com/gary-kim/riotchat/blob/master/CHANGELOG.md)" > releasemessage.txt
- hub release create -a build/artifacts/riotchat.tar.gz -F releasemessage.txt $DRONE_TAG
- name: release
image: garykim/personal-tools-image:latest
pull: always
environment:
NEXTCLOUD_APPS_TOKEN:
from_secret: nextcloud_apps_token
PRIVATE_KEY:
from_secret: signing_private_key
commands:
- krankerl login --appstore $NEXTCLOUD_APPS_TOKEN
- mkdir -p $HOME/.nextcloud/certificates
- curl --output $HOME/.nextcloud/certificates/riotchat.crt -L https://raw.githubusercontent.com/nextcloud/app-certificate-requests/master/riotchat/riotchat.crt
- echo -en $PRIVATE_KEY > $HOME/.nextcloud/certificates/riotchat.key
- krankerl publish https://github.com/gary-kim/riotchat/releases/download/$DRONE_TAG/riotchat.tar.gz
trigger:
event:
- tag
---
kind: signature
hmac: d5d20558ab6be286b3df9b94b79974d13cedae7e105c36b5201d313eb69d11a8
...