From 85b5d87fb7de61c6812f92f6ede56ba7a7496f68 Mon Sep 17 00:00:00 2001 From: Vitaliy Makogon Date: Wed, 20 Mar 2019 14:38:00 +0200 Subject: [PATCH] fix(travis): fix travis 'ngx-bootstrap-ci unpublish' (#5116) --- .travis.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d69cae28db..82217a5a6e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -82,6 +82,7 @@ jobs: - npm ci - npm run build - npm run ci:update-pkg + - if [[ "$TRAVIS_PULL_REQUEST" != false ]]; then export NPM_AUTH_TOKEN_CI=$NPM_AUTH_TOKEN_CI_PR; fi - npm config set '//registry.npmjs.org/:_authToken' $NPM_AUTH_TOKEN_CI - cd dist - npm publish --tag $TRAVIS_COMMIT @@ -135,7 +136,7 @@ jobs: after_script: - cd node_modules/ngx-bootstrap - npm config set '//registry.npmjs.org/:_authToken' $NPM_AUTH_TOKEN_CI - - npm unpublish --tag $TRAVIS_COMMIT --force + - if [[ "$TRAVIS_PULL_REQUEST" != false ]]; then npm unpublish --tag $TRAVIS_COMMIT --force; fi # deploy to ngx-bootstrap.surge.sh - &surge @@ -236,6 +237,10 @@ jobs: env: - CI_THREAD_INDEX=3.1x-electron - BASE_URL=http://ngx-bootstrap-latest.surge.sh/#/ + after_script: + - cd node_modules/ngx-bootstrap + - npm config set '//registry.npmjs.org/:_authToken' $NPM_AUTH_TOKEN_CI + - npm unpublish --tag $TRAVIS_COMMIT --force <<: *testPostDeploy - script: name: "Cypress on gh-pages after deploy 1thread"