# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
  build:
    docker:
      - image: circleci/node:8
    working_directory: ~/repo

    steps:
      - checkout

      # Download and cache dependencies
      - restore_cache:
          keys:
          - v1-dependencies-{{ checksum "package.json" }}
      - run: npm install

      - save_cache:
          paths:
            - node_modules
          key: v1-dependencies-{{ checksum "package.json" }}

      - run: npm run build
      - run: rm -R ~/repo/node_modules ~/repo/package-lock.json
      - run: zip -r ~/builds-tab.zip ~/repo

      - store_artifacts:
          path: ~/builds-tab.zip

# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
  build:
    docker:
      - image: circleci/node:8
    working_directory: ~/repo

    steps:
      - checkout

      # Download and cache dependencies
      - restore_cache:
          keys:
          - v1-dependencies-{{ checksum "package.json" }}
      - run: npm install

      - save_cache:
          paths:
            - node_modules
          key: v1-dependencies-{{ checksum "package.json" }}

      - run: npm run build
      - run: rm -R node_modules package-lock.json
      - run: mkdir ~/artifacts
      - run: zip -r ~/artifacts/builds-tab-$(node -e "console.log(require('./package.json').version)").zip .

      - store_artifacts:
          path: ~/artifacts/
          destination: builds-tab

Add version to artifact name
Add version to artifact name
