-
Notifications
You must be signed in to change notification settings - Fork 37
/
.gitlab-ci.yml
64 lines (59 loc) · 1.03 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
cache:
key: ${CI_BUILD_REF_NAME}_1
paths:
- node_modules/
stages:
- build
- deploy
build:tags:
stage: build
script:
- npm install
- npm run build:library
only:
- /^v.*$/
except:
- branches
artifacts:
paths:
- dist/
tags:
- shell
deploy:tags:
stage: deploy
script:
- echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
- npm run prepublishOnly
- npm publish dist/angular2-tinymce-lib
only:
- /^v.*$/
except:
- branches
dependencies:
- build:tags
tags:
- shell
build:master:
stage: build
script:
- npm install
- npm run build:library
- npm run build
only:
- master
artifacts:
paths:
- dist/
tags:
- shell
deploy:master:
stage: deploy
script:
- mv dist/angular2-tinymce/index.html dist/angular2-tinymce/200.html
- PATH=$(npm bin):$PATH surge --project ./dist/angular2-tinymce --domain https://angular2-tinymce.surge.sh
only:
- master
dependencies:
- build:master
tags:
- shell