stages: - tests - publish before_script: - npm install - npm install typescript tests: image: node:8.15-alpine stage: tests script: - npm run tslint - npm run test:unit publish: image: node:8.15-alpine stage: publish only: - tags script: - npm run prepublish - echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc - npm set scope @crawly - npm publish --access public