forked from satoshipay/solar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
79 lines (73 loc) · 1.44 KB
/
.gitlab-ci.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
image: node:12-buster
stages:
- test
- build
- release
test:
stage: test
cache:
key: ${CI_COMMIT_REF_SLUG}
policy: push
script:
- npm ci
- npm test
build_storybook:
# just used for testing; does not need to wait for the "test" stage to finish
stage: test
cache:
key: ${CI_COMMIT_REF_SLUG}
policy: pull
only:
changes:
- package.json
- .storybook/**
- src/**
- stories/**
- types/**
script:
- npm ci
- npx build-storybook
build_web:
# just used for testing; does not need to wait for the "test" stage to finish
stage: test
cache:
key: ${CI_COMMIT_REF_SLUG}
policy: pull
only:
changes:
- package.json
- src/**
- types/**
- web/**
script:
- npm ci
- cd web/ && npm run build
# Note that the `npm run build:*` commands will automatically create a GitHub release and upload binaries
build_mac:
stage: build
artifacts:
paths:
- electron/dist/*.zip
cache:
key: ${CI_COMMIT_REF_SLUG}
policy: pull
script:
- npm ci
- npm run build:mac -- --mac=zip
only:
- master
build_linux:
stage: build
artifacts:
paths:
- electron/dist/*.{deb,rpm}
cache:
key: ${CI_COMMIT_REF_SLUG}
policy: pull
script:
- apt-get update && apt-get install apt-file && apt-file update
- apt-get install -y rpm
- npm ci
- npm run build:linux -- --linux=deb --linux=rpm
only:
- master