sfm-js/.gitlab-ci.yml

28 lines
550 B
YAML
Raw Normal View History

2024-02-02 18:56:46 +00:00
image: node:latest
stages:
- testing
- deploy
test:
stage: testing
script:
- npm i
- npm run build
- npm run test
publish-npm:
stage: deploy
needs: ['test']
2024-02-02 18:59:02 +00:00
rules:
2024-02-03 23:04:54 +00:00
- if: $CI_COMMIT_BRANCH == "stable"
2024-02-02 18:59:02 +00:00
changes:
paths:
- package.json
2024-02-02 18:56:46 +00:00
script:
2024-02-02 19:40:41 +00:00
- echo "@transfem-org:registry=https://${CI_SERVER_HOST}/api/v4/projects/2/packages/npm/" > .npmrc
- echo "//${CI_SERVER_HOST}/api/v4/projects/2/packages/npm/:_authToken=${NPM_TOKEN}" >> .npmrc
2024-02-02 18:56:46 +00:00
- npm i
- npm run build
- npm publish