-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.gitlab-ci.yml
50 lines (42 loc) · 925 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
stages:
- test
- publish
image: node:dubnium
include:
template: Dependency-Scanning.gitlab-ci.yml
.test: &test
image: zenika/alpine-chrome:89-with-node
stage: test
script:
- npm ci
- cd packages/recorder && npm ci && cd -
- npm run lint
- npm run test
.publish: &publish
stage: publish
script:
- pushd packages/websocket
- npm set //registry.npmjs.org/:_authToken $NPM_TOKEN
# NOTE: Returns 403 when version is already published! And returns 404 when
# the authentication is incorrect.
- npm publish --access public || true
- popd
- pushd packages/recorder
- npm set //registry.npmjs.org/:_authToken $NPM_TOKEN
- npm publish --access public || true
test merge request:
<<: *test
only:
- merge_request
test master:
<<: *test
only:
- master
test tag:
<<: *test
only:
- tags
publish tag:
<<: *publish
only:
- tags