-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
46 lines (42 loc) · 1.1 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
stages:
- build
- deploy
build:
image: node:alpine
stage: build
when: on_success
retry: 1
allow_failure: false
only: [tags, triggers]
script:
- echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}'>.npmrc
- "sed -i 's/\"version\": \"0.0.1\"/'\"\\\"version\\\": \\\"${CI_COMMIT_TAG-0.0.1}\\\"\"'/g' ./package.json\n"
- npm install
- npm install babel-cli
- npm run build
- npm run minify
- mkdir build || ls build
- cp index.d.ts ./build/index.d.ts
- cp index.js ./build/index.js
- cp index.js.map ./build/index.js.map
- cp package.json ./build/package.json
- cp tsconfig.json ./build/tsconfig.json
- cp typedoc.json ./build/typedoc.json
- cp package-lock.json ./build/package-lock.json
- cp README.md ./build/README.md
- cp LICENSE ./build/LICENSE
artifacts:
expire_in: 3 hrs
paths:
- build/
publish:
image: node:alpine
stage: deploy
when: on_success
retry: 1
allow_failure: false
only: [tags, triggers]
script:
- cd ./build
- echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}'>.npmrc
- npm run publish