-
Notifications
You must be signed in to change notification settings - Fork 4
/
.drone.yml
59 lines (53 loc) · 996 Bytes
/
.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
kind: pipeline
name: default
steps:
- name: restore_cache
# Cache plugin https://github.com/drone-plugins/drone-volume-cache/issues/8
image: plugins/volume-cache
settings:
file: "${DRONE_REPO_NAME}.tar"
mount: ./../../cache
restore: true
volumes:
- name: yarn_cache
path: /cache
- name: install
image: smartprix/node:12
commands:
- yarn
- yarn lint
- yarn build
- tsc
environment:
YARN_CACHE_FOLDER: ./../../cache
# TODO: Add tests
# - name: test
# image: smartprix/node:12
# commands:
# - yarn test-only
# Publish npm package
- name: npm
image: plugins/npm
settings:
token:
from_secret: npm_token
when:
event:
- tag
- name: rebuild_cache
image: plugins/volume-cache
settings:
file: "${DRONE_REPO_NAME}.tar"
mount: ./../../cache
rebuild: true
volumes:
- name: yarn_cache
path: /cache
when:
status:
- success
- failure
volumes:
- name: yarn_cache
host:
path: /tmp/cache-12