-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
53 lines (47 loc) · 1.72 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
stages:
- build
- publish
build:
stage: build
tags: [ builder, integration ]
image: node:20.11
artifacts:
paths:
- npm-packages
expire_in: 30 days
script:
- export CI=false
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
- mkdir npm-packages
- yarn install --frozen-lockfile
- npx lerna run build
- (cd packages/nyris-react-components && npm pack && mv nyris-nyris-react-components-*.tgz ../../npm-packages/)
- (cd packages/nyris-api && npm pack && mv nyris-nyris-api-*.tgz ../../npm-packages/)
- (cd packages/nyris-widget && npm pack && mv nyris-nyris-widget-*.tgz ../../npm-packages/)
- (cd packages/nyris-webapp && npm pack && mv nyris-nyris-webapp-*.tgz ../../npm-packages/)
publish to npm:
stage: publish
when: manual
image: node:20.11
tags: [ builder, integration ]
script:
- mkdir -p ~/
- echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
- npm publish ./npm-packages/nyris-nyris-api-*.tgz --access public
- npm publish ./npm-packages/nyris-nyris-react-components-*.tgz --access public
- npm publish ./npm-packages/nyris-nyris-widget-*.tgz --access public
- npm publish ./npm-packages/nyris-nyris-webapp-*.tgz --access public
publish to github:
stage: publish
when: manual
image: alpine/git
tags: [ builder, integration ]
script:
- mkdir -p ~/.ssh
- ssh-keyscan github.com >> ~/.ssh/known_hosts
- chmod 600 $SSH_KEY
- export GIT_SSH_COMMAND='ssh -i $SSH_KEY'
- git remote add github [email protected]:nyris/nyris-webapp.git
- git gc
- git push --follow-tags --no-thin github HEAD:refs/heads/$CI_COMMIT_REF_NAME