-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
46 lines (46 loc) · 951 Bytes
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
version: 2.1
workflows:
build_and_deploy:
jobs:
- build:
context:
- NPM
- publish:
requires:
- build
context:
- NPM
filters:
branches:
only: master
jobs:
build:
working_directory: ~/package
resource_class: small
docker:
- image: circleci/node:16
steps:
- checkout
- run:
name: Build Package
command: |
yarn
yarn test
yarn build
- persist_to_workspace:
root: .
paths:
- .
publish:
working_directory: ~/package
resource_class: small
docker:
- image: circleci/node:16
steps:
- attach_workspace:
at: .
- run:
name: Deploy Package
command: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
npm publish