diff --git a/.travis.yml b/.travis.yml index eea18dfe6..8c22fd069 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,15 +11,15 @@ jobs: - stage: "Fundamental-react: Test" name: "Unit tests" script: npm run test:coverage + - stage: deploy + if: branch = master AND type != pull_request + before_deploy: + - bash ./ci-scripts/setup_npm.sh + deploy: + - provider: script + script: bash ./ci-scripts/publish.sh $TRAVIS_BRANCH $TRAVIS_BUILD_NUMBER + skip_cleanup: true notifications: email: on_failure: always - on_success: change -before_deploy: -- bash ./ci-scripts/setup_npm.sh -deploy: - - provider: script - script: bash ./ci-scripts/publish.sh $TRAVIS_BRANCH $TRAVIS_BUILD_NUMBER - on: - branch: master - skip_cleanup: true \ No newline at end of file + on_success: change \ No newline at end of file diff --git a/ci-scripts/publish.sh b/ci-scripts/publish.sh index c048ba4ab..ea211dfa5 100644 --- a/ci-scripts/publish.sh +++ b/ci-scripts/publish.sh @@ -17,7 +17,6 @@ git checkout develop git merge master git commit -a -m "chore: merge master into develop [ci skip]" git push --quiet --follow-tags "https://$GH_TOKEN@github.com/$TRAVIS_REPO_SLUG" develop > /dev/null 2>&1; - # publish master to npm git checkout master npm publish \ No newline at end of file