image: node:8.2.1 cache: key: ${CI_COMMIT_REF_SLUG} paths: - node_modules/ before_script: - npm install stages: - test - deploy lint: stage: test tags: - k8s-dev-eauction script: "npm run lint" publish: stage: deploy tags: - k8s-dev-eauction only: - /^v\d+\.\d+\..+$/ #match npm version tag except: - branches script: - echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}'>.npmrc - npm publish --access public