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