From 0de5f5a81a378d18760ba406097984a5c2b2d686 Mon Sep 17 00:00:00 2001 From: Nova Date: Sun, 5 Jul 2020 10:53:31 +0530 Subject: [PATCH] #7 Added deployment workflow in circle ci --- .circleci/config.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6a66827..ba5230b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,8 +13,35 @@ jobs: - run: sudo npm install -g serverless - run: npm test + deployment: + executor: node/default + steps: + - checkout + - run: + name: Authenticate with registry + command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc + - run: npm publish + workflows: build-and-test-workflow: jobs: - build-and-test + deployment-workflow: + jobs: + + - build-and-test: + filters: + tags: + only: /v[0-9]+(\.[0-9]+)*/ + branches: + ignore: /.*/ + + - deployment: + requires: + - build-and-test + filters: + tags: + only: /v[0-9]+(\.[0-9]+)*/ + branches: + ignore: /.*/ \ No newline at end of file