language: node_js node_js: - 6 - node cache: directories: - node_modules jobs: include: - stage: npm release if: branch IN (env(RELEASE_BRANCHES)) node_js: 6 script: npm run build before_deploy: - npm --no-git-tag-version version $($(npm bin)/json -f package.json version)-prerelease.$(date +%s) - git config --global user.email $(git log --pretty=format:"%ae" -n1) - git config --global user.name $(git log --pretty=format:"%an" -n1) deploy: provider: npm skip_cleanup: true email: $NPM_EMAIL api_key: $NPM_TOKEN