react-notify-toast
Version:
Toast notifications for React.js
34 lines (33 loc) • 1.02 kB
YAML
language: node_js
node_js:
- '10.16.0'
install:
- npm install
before_script:
- PACKAGE_VERSION=$(npm --loglevel silent run read:version)
- TAG_FOUND=$(if GIT_DIR=$(git show-ref --tags | grep -q "refs/tags/$PACKAGE_VERSION$"); then echo true; else echo false; fi)
- npm run lint
cache:
directories:
- node_modules
deploy:
provider: npm
email: $NPM_EMAIL
api_key: $NPM_API_KEY
skip_cleanup: true
on:
condition: "$TAG_FOUND == false"
branch: master
after_deploy:
if ([ "$TRAVIS_BRANCH" == "master" ] || [ ! -z "$PACKAGE_VERSION" ]) &&
[ "$TRAVIS_PULL_REQUEST" == "false" ]; then
git config --global user.email "builds@travis-ci.com";
git config --global user.name "Travis CI";
export GIT_TAG=$PACKAGE_VERSION;
git tag $GIT_TAG -a -m "Generated tag from TravisCI build $TRAVIS_BUILD_NUMBER";
git push --quiet https://$GH_TOKEN@GIT_URL > /dev/null 2>&1;
fi
# > /dev/null 2>&1 prevents key from being printed to logs
branches:
except:
- /^(\d+\.)(\d+\.)(\d+)(-\w+)?$/