-
Notifications
You must be signed in to change notification settings - Fork 5
/
.drone.yml
75 lines (67 loc) · 1.43 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
---
kind: pipeline
type: docker
name: default
workspace:
path: /drone/src
volumes:
- name: cache
temp: { }
- name: dist
temp: { }
environment:
NPM_CONFIG_CACHE: /cache/npm/cache
steps:
- name: deps
image: node:14.18.1
volumes:
- name: cache
path: /cache
commands:
- yarn install --non-interactive
- name: build
image: node:14.18.1
volumes:
- name: cache
path: /cache
- name: dist
path: /drone/src/dist
commands:
- yarn build --dest dist/public
depends_on:
- deps
- name: build packages
image: alpine:3.14.3
volumes:
- name: dist
path: /drone/src/dist
commands:
- export VERSION=${DRONE_TAG:-${DRONE_COMMIT:0:7}}
- apk --no-cache add nfpm
- nfpm pkg -f packaging/nfpm-amd64.yaml --packager deb --target dist/wgrest-webapp_amd64.deb
- nfpm pkg -f packaging/nfpm-arm64.yaml --packager deb --target dist/wgrest-webapp_arm64.deb
- tar -czvf dist/webapp.tar.gz -C dist/ public
- rm -rf dist/public
depends_on:
- build
- name: github release
image: plugins/github-release
volumes:
- name: dist
path: /drone/src/dist
settings:
api_key:
from_secret: github_token
files: dist/*
checksum:
- md5
- sha1
depends_on:
- build packages
when:
event:
- tag
trigger:
event:
- push
- tag