# Testing test: stage: test image: node:20 cache: paths: - node_modules except: - master variables: CI: 1 script: - npm install - npm run test || true # Non-blocking tests as third-party API could temporary fail # Release publishing on npm publish: stage: deploy only: refs: - tags image: node:20 cache: paths: - node_modules variables: CI: 1 script: - npm install - npm run build - echo "//registry.npmjs.org/:always-auth=true" > ~/.npmrc - echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc - npm publish --userconfig=~/.npmrc --registry=https://registry.npmjs.org/ # Develop publishing on npm publish-develop-tag: stage: deploy only: - develop image: node:20 cache: paths: - node_modules variables: CI: 1 script: - npm install - npm run build - echo "//registry.npmjs.org/:always-auth=true" > ~/.npmrc - echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc - VERSION=`npm view pic4carto version` - npm version --no-git-tag-version $VERSION-develop-$CI_COMMIT_SHORT_SHA - npm publish --tag develop --userconfig=~/.npmrc --registry=https://registry.npmjs.org/