defaults: &defaults
  working_directory: ~/unexpected-immutable
  docker:
      - image: node:dubnium

version: 2
jobs:
  build_and_test:
    <<: *defaults
    steps:
      - checkout
      - restore_cache:
          key: v1-{{ checksum "package-lock.json" }}
      - run: npm ci
      - save_cache:
          key: v1-{{ checksum "package-lock.json" }}
          paths:
              - node_modules
      - run: npm test
      - persist_to_workspace:
          root: ~/
          paths:
            - unexpected-immutable
  deploy:
    <<: *defaults
    steps:
      - attach_workspace:
          at: ~/
      - deploy:
          name: Authenticate with npm
          command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/unexpected-immutable/.npmrc
      - deploy:
          name: build
          command: npm run build
      - deploy:
          name: Publish
          command: npm publish

workflows:
  version: 2
  build_test_and_deploy:
    jobs:
      - build_and_test
      - deploy:
          requires:
            - build_and_test
          filters:
            branches:
              only: master

defaults: &defaults
  working_directory: ~/unexpected-immutable
  docker:
      - image: node:dubnium

version: 2
jobs:
  build_and_test:
    <<: *defaults
    steps:
      - checkout
      - restore_cache:
          key: v1-{{ checksum "package-lock.json" }}
      - run: npm ci
      - save_cache:
          key: v1-{{ checksum "package-lock.json" }}
          paths:
              - node_modules
      - run: npm test

workflows:
  version: 2
  build_test:
    jobs:
      - build_and_test

Remove auto publish broken by OTP
Chore: Remove auto publish broken by OTP
