diff --git a/.circleci/config.yml b/.circleci/config.yml index edc739df4ddcfc5d8da602e107e7dfcfeda54960..f749a45c3d7339d691af71c7945b2f8e0f494b41 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ # # Check https://circleci.com/docs/2.0/language-javascript/ for more details # -version: 2 +version: 2.1 jobs: build: docker: @@ -49,6 +49,17 @@ jobs: command: npm run build - store_artifacts: path: build + - store_artifacts: + path: dist + - save_cache: + paths: + - build + key: v1-build-{{ .BuildNum }} + - save_cache: + paths: + - dist + key: v1-dist-{{ .BuildNum }} + - run: name: Integration @@ -59,3 +70,29 @@ jobs: path: test-results - run: greenkeeper-lockfile-upload + deploy-npm: + docker: + - image: circleci/node:8.16-browsers + working_directory: ~/repo + steps: + - checkout + - restore_cache: + keys: + - v1-dist-{{ .BuildNum }} + - run: npm publish --dry-run +workflows: + version: 2 + build_and_deploy: + jobs: + - build + - deploy-npm: + requires: + - build + filters: + branches: + only: + - master + - develop + - smoke + - circle + - /^hotfix\/.*/