From 0f04ec28ecac60ae68bae908baee1e50680652b2 Mon Sep 17 00:00:00 2001 From: Boopathi Rajaa Date: Tue, 28 Nov 2017 12:59:35 +0100 Subject: [PATCH] ci(build-stages): Publish nightly (#744) --- .travis.yml | 41 +++++++++++++++++++++++++++-------------- package.json | 2 +- 2 files changed, 28 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4ceda80b3..ec920c850 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,3 @@ ---- git: depth: 10 sudo: false @@ -6,24 +5,38 @@ 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 diff --git a/package.json b/package.json index 36fb0b51a..3d3e193cb 100644 --- a/package.json +++ b/package.json @@ -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",