Skip to content

Commit 7e9fe9b

Browse files
committed
added deploy step to ci
1 parent b9ea37c commit 7e9fe9b

File tree

1 file changed

+37
-5
lines changed

1 file changed

+37
-5
lines changed

Diff for: .circleci/config.yml

+37-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
version: 2
2-
jobs:
3-
build:
4-
docker:
5-
- image: circleci/node:10
62

7-
working_directory: ~/skycons
3+
defaults: &defaults
4+
working_directory: ~/skycons
5+
docker:
6+
- image: circleci/node:10
87

8+
jobs:
9+
build:
10+
<<: *defaults
911
steps:
1012
- checkout
1113
- restore_cache:
@@ -22,3 +24,33 @@ jobs:
2224

2325
- run: npm run lint
2426
- run: npm run build
27+
28+
- persist_to_workspace:
29+
root: ~/skycons
30+
paths: .
31+
32+
deploy:
33+
<<: *defaults
34+
steps:
35+
- attach_workspace:
36+
at: ~/skycons
37+
- run:
38+
name: Authenticate with registry
39+
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/skycons/.npmrc
40+
- run:
41+
name: Publish package
42+
command: npm publish
43+
44+
workflows:
45+
version: 2
46+
default_workflow:
47+
jobs:
48+
- build
49+
- deploy:
50+
requires:
51+
- build
52+
filters:
53+
tags:
54+
only: /^v.*/
55+
branches:
56+
ignore: /.*/

0 commit comments

Comments
 (0)