From d011aca301c6142f32674fced7f9a541d0bb238f Mon Sep 17 00:00:00 2001 From: rschamp <rschamp@media.mit.edu> Date: Fri, 30 Aug 2019 14:01:37 -0400 Subject: [PATCH] Add NPM publish step --- .circleci/config.yml | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index edc739df4..f749a45c3 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\/.*/ -- GitLab