-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
59 lines (52 loc) · 937 Bytes
/
.gitlab-ci.yml
File metadata and controls
59 lines (52 loc) · 937 Bytes
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
image: node:24
cache:
key:
files:
- package-lock.json
paths:
- node_modules/
stages:
- install
- check
- build
- publish
install:
stage: install
script:
- npm ci
check:
stage: check
needs:
- install
script:
- npm run check
build:
stage: build
needs:
- install
script:
- npm run build:dist
artifacts:
paths:
- dist/
expire_in: 1 hour
publish-to-npm:
stage: publish
needs:
- build
- check
script:
- echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ./.npmrc
- npm publish --access public
rules:
- if: $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+$/
publish-to-npm-beta:
stage: publish
needs:
- build
- check
script:
- echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ./.npmrc
- npm publish --access public --tag beta
rules:
- if: $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+-beta\.[0-9]+$/