forked from farooqkz/chooj
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
65 lines (59 loc) · 1.93 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
# Official framework image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/node/tags/
image: node:12.22.12-bullseye
stages:
- fetch
- build
- bundle
# This folder is cached between builds
# https://docs.gitlab.com/ee/ci/yaml/index.html#cache
cache:
paths:
- node_modules/
- .yarn/
- build/
- yarn.lock
before_script:
- npm config set registry https://registry.npmmirror.com
- npm config set disturl https://registry.npmmirror.com/-/binary/node
- npm config set electron_mirror https://registry.npmmirror.com/-/binary/electron/
- npm config set electron_builder_binaries_mirror https://npmmirror.com/mirrors/electron-builder-binaries/
- npm config set sass_binary_site https://npmmirror.com/mirrors/node-sass/
- yarn config set registry https://registry.npmmirror.com
- yarn config set disturl https://registry.npmmirror.com/-/binary/node
- yarn config set electron_mirror https://registry.npmmirror.com/-/binary/electron/
- yarn config set electron_builder_binaries_mirror https://npmmirror.com/mirrors/electron-builder-binaries/
- yarn config set sass_binary_site https://npmmirror.com/mirrors/node-sass/
- sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
fetch:
stage: fetch
script:
- yarn install --cache-folder .yarn
build:
stage: build
needs:
- fetch
script:
- yarn run devbuild
- cp -r build chooj-${CI_COMMIT_SHORT_SHA}
artifacts:
name: chooj-${CI_COMMIT_SHORT_SHA}
paths:
- chooj-*/
omnisd:
stage: bundle
needs:
- build
script:
- apt update
- apt install zip -y
- 'echo {\"version\": 1, \"manifestURL\": \"app://chooj.bananahackers.net/manifest.webapp\"} > metadata.json'
- cd build
- zip -r application.zip *
- cd ..
- mv build/application.zip .
artifacts:
name: chooj-omnisd-${CI_COMMIT_SHORT_SHA}
paths:
- application.zip
- metadata.json