stages: - test - lint - publish image: node:alpine cache: key: node_modules paths: - .npm/ before_script: - npm ci --cache .npm --prefer-offline test: stage: test before_script: - npm install script: - npm run test lint: stage: lint script: - npm run lint publish: stage: publish before_script: - echo "Creating NPM-RC" - echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc - npm install script: - npm run build - npm publish --access public