image: node:18.12-alpine stages: - publish cache: key: npm policy: pull-push paths: - .npm/ # Publish the SDK to NPM Registry when a qa tag is created publish_qa: stage: publish before_script: - npm ci --cache .npm --prefer-offline - echo "//registry.npmjs.org/:_authToken=$APXOR_NPM_TOKEN" >> ~/.npmrc script: - npm publish --access public --tag qa environment: name: QA rules: - if: '$CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+-qa.\d+$/' # Publish the SDK to NPM Registry when a tag is created publish: stage: publish before_script: - npm ci --cache .npm --prefer-offline - echo "//registry.npmjs.org/:_authToken=$APXOR_NPM_TOKEN" >> ~/.npmrc script: - npm publish --access public environment: name: Production url: https://www.npmjs.com/package/cordova-plugin-apxor-sdk rules: - if: '$CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+$/' when: manual