-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
65 lines (59 loc) · 1.21 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
image: docker.slock.it/build-images/node:8-alpine
variables:
COMMIT_IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
RELEASE_IMAGE_TAG: $CI_REGISTRY_IMAGE:latest
stages:
- build
- test
- deploy
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules/
build:
stage: build
tags:
- short-jobs
script:
- sh /prepare.sh
- npm install
- npm run build
artifacts:
paths:
- js/
test-trie:
stage: test
tags:
- short-jobs
script:
- sh /prepare.sh
- npm install
- npm test
deploy-to-slockit-npm:
stage: deploy
tags:
- short-jobs
only: # deploy only on semantic versions tags
- /^v[0-9]*\.[0-9]*\.[0-9]*-?.*$/
except:
- branches
dependencies:
- build
script:
- sh /prepare.sh
- npm --no-git-tag-version --allow-same-version -f version $CI_COMMIT_TAG
- npm publish
deploy-to-public_npm:
stage: deploy
tags:
- short-jobs
only: # deploy only on semantic versions tags
- /^v[0-9]*\.[0-9]*\.[0-9]*-?.*$/
except:
- branches
dependencies:
- build
script:
- sh /prepare.sh
- npm --no-git-tag-version --allow-same-version -f version $CI_COMMIT_TAG
- npm publish --registry https://registry.npmjs.org