Skip to content

Commit

Permalink
ci(build-stages): Publish nightly (babel#744)
Browse files Browse the repository at this point in the history
  • Loading branch information
boopathi authored Nov 28, 2017
1 parent f7ff978 commit 0f04ec2
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 15 deletions.
41 changes: 27 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,42 @@
---
git:
depth: 10
sudo: false
language: node_js
cache: yarn

node_js:
- '8'
- '6'
- '4'
- '8'
- '6'
- '4'

before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.3.2
- export PATH=$HOME/.yarn/bin:$PATH
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.3.2
- export PATH=$HOME/.yarn/bin:$PATH

before_script:
- yarn build
- yarn build

script:
- if [ -n "${LINT-}" ]; then yarn run lint ; fi
- if [ -z "${SKIPTESTS-}" ]; then yarn run coverage; fi
- yarn coverage

matrix:
include:
- node_js: "node"
env: LINT=true SKIPTESTS=true
after_success:
- yarn coverage-ci

stages:
- lint
- test
- name: publish
if: (branch = master) AND (repo = babel/minify)

after_success: yarn run coverage-ci
jobs:
include:
- stage: lint
node_js: '8'
script: yarn lint
- stage: publish
node_js: '8'
script: 'echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc'
deploy:
provider: script
script: npm run publish-master
skip_cleanup: true
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"fix": "eslint --fix .",
"lint": "eslint .",
"publish": "git pull origin master --rebase && npm run build && npm test && lerna publish",
"publish-internal": "git pull origin master --rebase && npm run build && NPM_DIST_TAG=internal ./node_modules/.bin/lerna publish --skip-git",
"publish-master": "lerna publish -c --yes -m 'chore(canary): publish %s'",
"test": "jest --maxWorkers=4 --no-cache",
"test-ci": "npm run bootstrap && npm run build && npm run coverage",
"updated": "lerna updated",
Expand Down

0 comments on commit 0f04ec2

Please sign in to comment.