File tree 1 file changed +41
-5
lines changed
1 file changed +41
-5
lines changed Original file line number Diff line number Diff line change 3
3
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
4
4
#
5
5
version : 2
6
- jobs :
7
- build :
8
- docker :
9
- - image : circleci/node:8.12
10
6
11
- working_directory : ~/repo
7
+ defaults : &defaults
8
+ working_directory : ~/repo
9
+ docker :
10
+ - image : circleci/node:8.12
11
+
12
+ jobs :
13
+ test :
14
+ << : *defaults
12
15
13
16
steps :
14
17
- checkout
45
48
46
49
# run tests!
47
50
- run : npm test
51
+ deploy :
52
+ << : *defaults
53
+ steps :
54
+ - attach_workspace :
55
+ at : ~/repo
56
+ - run :
57
+ name : Authenticate with registry
58
+ command : echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/repo/.npmrc
59
+ - run :
60
+ name : Publish package
61
+ command : npm publish
62
+ workflows :
63
+ version : 2
64
+ test :
65
+ jobs :
66
+ - test
67
+ test_and_deploy :
68
+ jobs :
69
+ - test :
70
+ # only runs when commit with tag in /^v.*/ pattern
71
+ filters :
72
+ tags :
73
+ only : /^v.*/
74
+ branches :
75
+ only : master
76
+ - deploy :
77
+ requires :
78
+ - test
79
+ filters :
80
+ branches :
81
+ ignore : /.*/
82
+ tags :
83
+ only : /^v.*/
You can’t perform that action at this time.
0 commit comments