sudo: required language: node_js node_js: - "14" services: - docker branches: only: - master before_install: - docker run -d --name etcd -p 2380:2380 -p 4001:4001 quay.io/coreos/etcd:latest /usr/local/bin/etcd --data-dir=data.etcd --name "my-etcd" --cors='*' --initial-advertise-peer-urls http://0.0.0.0:2380 --listen-peer-urls http://0.0.0.0:2380 --advertise-client-urls http://0.0.0.0:4001 --listen-client-urls http://0.0.0.0:4001 --initial-cluster-state new install: - npm install cache: directories: - node_modules script: - npm run lint && npm run test:cov after_script: "npm run coverage" 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 skipped!" fi deploy: skip_cleanup: true provider: npm email: "nassi9@gmail.com" api_key: $NPM_AUTH_TOKEN on: branch: master