language: node_js node_js: - "10" services: - docker - redis-server branches: only: - master install: - npm install cache: directories: - node_modules script: - npm test after_success: - | if ([ "$TRAVIS_BRANCH" == "master" ] || [ ! -z "$TRAVIS_TAG" ]) && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then git config --global user.email "travis@travis-ci.org" git config --global user.name "Travis CI" git remote set-url --push origin "https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git" git remote -v git checkout -f -b version-branch npm version patch -m "$(git log -1 --pretty=%B) .... bump version [skip ci]" git push origin version-branch:master --follow-tags else echo "version skiped!" fi deploy: skip_cleanup: true provider: npm email: "yehiyam@gmail.com" api_key: $NPM_AUTH_TOKEN on: branch: master