image: node:latest # Setup stages stages: - lint - test - audit - release lint: stage: lint script: - npm install - npm run lint test:node:14: stage: test image: node:14 script: - npm install - npm run test test:node:12: stage: test image: node:12 script: - npm install - npm run test test:node:10: stage: test image: node:10 script: - npm install - npm run test audit: stage: audit script: - npm install - npm audit # Push image with release tag release: stage: release script: - echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}'>.npmrc - npm publish only: - tags - triggers