version: 2
jobs:
  build:
    working_directory: ~/quorum
    docker:
      - image: circleci/node:6.11.1
    steps:
      - checkout
      - restore_cache:
          key: dependency-cache-{{ checksum "package.json" }}
      - run:
          name: install
          command: yarn install
      - save_cache:
          key: dependency-cache-{{ checksum "package.json" }}
          paths:
            - ./node_modules
      - run:
          name: test
          command: yarn test
      - store_artifacts:
          path: test-results.xml
          prefix: tests
      - store_test_results:
          path: test-results.xml
      - deploy:
          name: Deploy
          command: |
            if [ "${CIRCLE_BRANCH}" == "master" ]; then
              yarn run ci-config
              yarn run deploy
              if [ ! -z "${NPM_TOKEN}" ]; then
                echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
                yarn run 2npm
              fi
            fi

version: 2
jobs:
  build:
    working_directory: ~/quorum
    docker:
      - image: circleci/node:6.11.1
    steps:
      - checkout
      - restore_cache:
          key: dependency-cache-{{ checksum "package.json" }}
      - run:
          name: install
          command: yarn install
      - save_cache:
          key: dependency-cache-{{ checksum "package.json" }}
          paths:
            - ./node_modules
      - run:
          name: test
          command: yarn test
      - store_artifacts:
          path: test-results.xml
          prefix: tests
      - store_test_results:
          path: test-results.xml
      - deploy:
          name: Deploy
          command: |
            if [ "${CIRCLE_BRANCH}" == "master" ]; then
              yarn run ci-config
              yarn run deploy
              if [ ! -z "${NPM_TOKEN}" ]; then
                echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
                npm run 2npm
              fi
            fi

Fix bug with yarn publish
Fix bug with yarn publish
