image: node:8 stages: - testlist - deploy .gcloud: &gcloud - echo "Funcionando" testlist: variables: GIT_SUBMODULE_STRATEGY: recursive image: node stage: testlist script: - npm install - npm run pretest - npm run test master: variables: GIT_SUBMODULE_STRATEGY: recursive stage: deploy before_script: *gcloud environment: name: master script: - echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}'>.npmrc - npm publish only: - master