UNPKG

526 BYAMLView Raw
1version: 2.1
2
3jobs:
4 build:
5 shell: /bin/bash
6 docker:
7 - image: cimg/node:16.20.2
8 steps:
9 - checkout
10 - run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
11 - run: npm i
12 - run:
13 command: |
14 b=(${CIRCLE_BRANCH/-/ })
15 if [ $b == "release" ]; then
16 echo "Publishing to NPM"
17 npm publish --access=public
18 fi
19
20workflows:
21 version: 2
22 build-and-deploy:
23 jobs:
24 - build:
25 context: org-global