Publish to preview dist-tag on smoke and master
Continue to publish to latest for develop
This commit is contained in:
1 parent
fdde5dd527
commit
95216b5d05
1 file changed
+9
-4
+9
-4
@@ -9,19 +9,21 @@ env:
|
||||
global:
|
||||
- NODE_ENV=production
|
||||
- SMOKE_URL=https://llk.github.io/scratch-gui/$TRAVIS_PULL_REQUEST_BRANCH
|
||||
- NPM_TAG=preview
|
||||
cache:
|
||||
directories:
|
||||
- node_modules
|
||||
install:
|
||||
- npm --production=false install
|
||||
- npm --production=false update
|
||||
before_deploy:
|
||||
- npm --no-git-tag-version version 0.1.0-prerelease.$(date +%Y%m%d%H%M%S)
|
||||
- git config --global user.email $(git log --pretty=format:"%ae" -n1)
|
||||
- git config --global user.name $(git log --pretty=format:"%an" -n1)
|
||||
script:
|
||||
- npm test
|
||||
- if [ "$TRAVIS_EVENT_TYPE" == "pull_request" ] && [ "$TRAVIS_BRANCH" == "master" ]; then npm run test:smoke; fi
|
||||
before_deploy:
|
||||
- npm --no-git-tag-version version 0.1.0-prerelease.$(date +%Y%m%d%H%M%S)
|
||||
- if [ "$TRAVIS_BRANCH" == "develop" ]; then export NPM_TAG=latest; fi
|
||||
- git config --global user.email $(git log --pretty=format:"%ae" -n1)
|
||||
- git config --global user.name $(git log --pretty=format:"%an" -n1)
|
||||
deploy:
|
||||
- provider: script
|
||||
on:
|
||||
@@ -39,9 +41,12 @@ deploy:
|
||||
branch:
|
||||
- master
|
||||
- develop
|
||||
- smoke
|
||||
- npm-preview-channel
|
||||
skip_cleanup: true
|
||||
email: $NPM_EMAIL
|
||||
api_key: $NPM_TOKEN
|
||||
tag: $NPM_TAG
|
||||
- provider: s3
|
||||
on:
|
||||
branch:
|
||||
|
||||
Reference in new issue
Block a user