blob: 8d94d03ef9bfdac1e5e30362e9215e5292b340d4 (
plain)
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
|
image: node:latest
stages:
- deploy
- install
deploy:
stage: deploy
script:
- echo "//${CI_SERVER_HOST}/api/v4/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=<%= auth_token %>">.npmrc
- npm publish
only:
- "<%= project.default_branch %>"
tags:
- "runner-for-<%= project.name %>"
install:
stage: install
script:
- "npm config set @<%= registry_scope %>:registry <%= gitlab_address_with_port %>/api/v4/projects/${CI_PROJECT_ID}/packages/npm/"
- "npm install <%= package.name %>"
cache:
key: ${CI_BUILD_REF_NAME}
paths:
- node_modules/
artifacts:
paths:
- node_modules/
only:
- "<%= project.default_branch %>"
tags:
- "runner-for-<%= project.name %>"
|