forked from paperjs/paper.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
62 lines (58 loc) · 1.44 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
default:
image: ubuntu:latest
before_script:
- apt-get update --fix-missing
- apt -y install build-essential
- apt-get -y install git libcairo2-dev libpango1.0-dev libssl-dev libssl-dev libgif-dev
- yarn install --immutable
- |
{
echo "@${CI_PROJECT_ROOT_NAMESPACE}:registry=${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/npm/"
echo "${CI_API_V4_URL#https?}/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=\${CI_JOB_TOKEN}"
} | tee --append .npmrc
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- .npm/
workflow:
rules:
- if: $CI_COMMIT_BRANCH
variables:
NPM_TOKEN: ${CI_JOB_TOKEN}
OPENSSL_CONF: '/dev/null'
stages:
- install_build
- test
- deploy
install_yarn:
stage: install_build
image: node:lts
dependencies: []
script:
- yarn build
- yarn minify
artifacts:
expire_in: 30 mins
paths:
- dist
test:
stage: test
image: node:lts
dependencies:
- install_yarn
script:
- yarn jshint
- yarn test
deploy:
stage: deploy
image: node:14-buster
dependencies:
- install_yarn
- test
script:
- ls -al
- cat .npmrc
- echo "${CI_API_V4_URL#https?}/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=\${CI_JOB_TOKEN}" >> .npmrc
- npm publish
only:
- master