2018-09-02 13:14:29 +00:00
|
|
|
version: 2
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
docker:
|
|
|
|
- image: circleci/node:8-browsers
|
|
|
|
working_directory: ~/repo
|
|
|
|
steps:
|
|
|
|
- checkout
|
2018-10-02 12:49:39 +00:00
|
|
|
- run:
|
2019-02-11 07:15:23 +00:00
|
|
|
name: Installing dependencies
|
|
|
|
command: yarn install
|
|
|
|
- run:
|
|
|
|
name: Bootstrapping
|
|
|
|
command: yarn bootstrap
|
|
|
|
- run:
|
|
|
|
name: Linting
|
|
|
|
command: yarn lint
|
|
|
|
- run:
|
|
|
|
name: Tests
|
|
|
|
command: yarn test
|
|
|
|
- run:
|
|
|
|
name: Potentially save npm token
|
|
|
|
command: "([[ ! -z $NPM_TOKEN ]] && echo \"//registry.npmjs.org/:_authToken=$NPM_TOKEN\" >> ~/.npmrc) || echo \"Did not write npm token\""
|
2018-10-02 12:49:39 +00:00
|
|
|
- run:
|
2019-02-11 07:15:23 +00:00
|
|
|
name: Potentially publish canary release
|
|
|
|
command: "if ls ~/.npmrc >/dev/null 2>&1 && [[ $(git describe --exact-match 2> /dev/null || :) =~ -canary ]]; then yarn run lerna publish from-git --npm-tag canary --yes; else echo \"Did not publish\"; fi"
|
2018-10-02 12:49:39 +00:00
|
|
|
- run:
|
2019-02-11 07:15:23 +00:00
|
|
|
name: Potentially publish stable release
|
|
|
|
command: "if ls ~/.npmrc >/dev/null 2>&1 && [[ ! $(git describe --exact-match 2> /dev/null || :) =~ -canary ]]; then yarn run lerna publish from-git --yes; else echo \"Did not publish\"; fi"
|
2018-10-02 12:49:39 +00:00
|
|
|
workflows:
|
|
|
|
version: 2
|
2019-02-11 07:15:23 +00:00
|
|
|
build-and-deploy:
|
2018-10-02 12:49:39 +00:00
|
|
|
jobs:
|
2019-02-11 07:15:23 +00:00
|
|
|
- build
|