From 8fded0b98a43b1a55d8f7c3aab8a5164e9389d3a Mon Sep 17 00:00:00 2001 From: Anton Vakhrushev Date: Sat, 21 Mar 2020 20:15:41 +0300 Subject: [PATCH] Add circle ci publish task --- .circleci/config.yml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9b72688..b0983e1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,7 @@ version: 2.1 jobs: - test_and_publish: + test: docker: - image: node:12.16-alpine steps: @@ -9,11 +9,28 @@ jobs: - run: npm ci - run: npm run format-check - run: npm run test + + build_and_publish: + docker: + - image: node:12.16-alpine + steps: + - checkout + - run: npm ci - run: npm run build - run: npm run build:dev + - run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc + - run: npm publish --tag "${CIRCLE_TAG}" --access public workflows: version: 2 test_and_publish: jobs: - - test_and_publish + - test + - build_and_publish: + requires: + - test + filters: + tags: + only: /^\d+\.\d+\.\d+$/ + branches: + ignore: /.*/ \ No newline at end of file