-
Notifications
You must be signed in to change notification settings - Fork 41
/
.gitlab-ci.yml
71 lines (64 loc) · 983 Bytes
/
.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
image: node:16
before_script:
- yarn install --cache-folder .yarn
# Cache node modules in between jobs
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- .yarn/
stages:
- build
- release
- deploy
build:
stage: build
script:
- yarn install
- yarn test
- yarn build
artifacts:
paths:
- dist
- docs
- demo
expire_in: 1 week
except:
refs:
- /^v\d+\.\d+\.\d+.*$/
release-develop:
stage: release
script:
- npx semantic-release
artifacts:
paths:
- CHANGELOG.md
- dist
- docs
- demo
expire_in: 1 week
only:
refs:
- develop
release-prod:
stage: release
script:
- npx semantic-release
artifacts:
paths:
- CHANGELOG.md
- dist
only:
refs:
- master
pages:
stage: deploy
script:
- yarn build
- cp -r demo public
- cp -r docs public/docs
artifacts:
paths:
- public
expire_in: 1 day
only:
- master