Skip to content

Commit

Permalink
Update travis auto deploy to npm
Browse files Browse the repository at this point in the history
  • Loading branch information
alialdallal-scotia committed Nov 30, 2018
1 parent 1c95073 commit 4a156c0
Showing 1 changed file with 11 additions and 27 deletions.
38 changes: 11 additions & 27 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,18 @@
language: node_js
node_js:
- 8.9.3

branches:
only:
- master # (PRs to master, master merges, master pushes)

- master
env:
global:
- CI_BUILD_NUMBER=$TRAVIS_BUILD_NUMBER
- secure: "Kxy+3yhmNSCtAD5HCVvk/WcII8ULI8QQ/UTdDnhvmLWMCGNAI53JxZ1QNP+n4S6ZynU+SFsu/zWqFVN6+moOhKn/9ZAo1Ia2WWrArgAVU5hT+NyJzyJOrq6hrVgCu4hHdYtiJIV8CJyZnyYqQK0WmXdLemxaPmG/GN6SYjv0Z5k="

before_install:
- echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc

after_script:
- git config --global user.email "[email protected]"
- git config --global user.name "Travis CI"
- >
[ "${TRAVIS_BRANCH}" = "master" ] && [ "${TRAVIS_PULL_REQUEST}" = "false" ] &&
export GIT_TAG=$(make version) ||
export GIT_TAG=$(make version)-beta
- >
[ "${TRAVIS_BRANCH}" = "master" ] && [ "${TRAVIS_PULL_REQUEST}" = "false" ] &&
export NPM_TAG=latest ||
export NPM_TAG=beta
- echo "GIT_TAG=$GIT_TAG"
- echo "NPM_TAG=$NPM_TAG"
- >
[ "${TRAVIS_BRANCH}" != "master" ] &&
echo "skipping versioning" ||
npm version $GIT_TAG -m "Version $GIT_TAG built by Travis CI - https://travis-ci.com/$TRAVIS_REPO_SLUG/builds/$TRAVIS_JOB_ID" &&
npm publish --tag $NPM_TAG
- CI_BUILD_NUMBER=$TRAVIS_BUILD_NUMBER
- secure: Kxy+3yhmNSCtAD5HCVvk/WcII8ULI8QQ/UTdDnhvmLWMCGNAI53JxZ1QNP+n4S6ZynU+SFsu/zWqFVN6+moOhKn/9ZAo1Ia2WWrArgAVU5hT+NyJzyJOrq6hrVgCu4hHdYtiJIV8CJyZnyYqQK0WmXdLemxaPmG/GN6SYjv0Z5k=
deploy:
provider: npm
email: [email protected]
api_key:
secure: dYznL6RTQQaauNKV+6wUIzoJBeIolUoUTGi5URvZ96x9+EM4mJSmCt8RCACC+5Y81T6KnWh5l6cv1MNuY2QyjtVJosoqYhNdPUB1ZfQauUI/vpNHJmnT0mN/ADSN8TjfCBfSq3TAubaAXefJ2ZsMbd344Bs0oCKrJ7C7TkBvaMs=
on:
tags: true
repo: alicoding/node-transifex

0 comments on commit 4a156c0

Please sign in to comment.