File tree Expand file tree Collapse file tree 1 file changed +66
-0
lines changed
Expand file tree Collapse file tree 1 file changed +66
-0
lines changed Original file line number Diff line number Diff line change 1+ version : 2
2+
3+ defaults : &defaults
4+ working_directory : ~/repo
5+ docker :
6+ - image : circleci/node:latest
7+
8+ jobs :
9+ test :
10+ << : *defaults
11+ steps :
12+ - checkout
13+ - restore_cache :
14+ keys :
15+ - v1-dependencies-{{ checksum "package.json" }}
16+ - v1-dependencies-
17+ - run : npm install
18+ # These tests require built files to test against
19+ - run : npm run build
20+ - save_cache :
21+ paths :
22+ - node_modules
23+ key : v1-dependencies-{{ checksum "package.json" }}
24+ - run : npm run test
25+
26+ # Used to publish latest
27+ deploy :
28+ << : *defaults
29+ steps :
30+ - checkout
31+ - restore_cache :
32+ keys :
33+ - v1-dependencies-{{ checksum "package.json" }}
34+ - v1-dependencies-
35+ - run : npm install
36+ - save_cache :
37+ paths :
38+ - node_modules
39+ key : v1-dependencies-{{ checksum "package.json" }}
40+ - run : npm run build
41+ - run :
42+ name : Write NPM Token to ~/.npmrc
43+ command : echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/repo/.npmrc
44+ - run :
45+ name : Publish package
46+ command : npx semantic-release@17.0.4
47+
48+ workflows :
49+ version : 2
50+
51+ # PULL REQUEST
52+ test :
53+ jobs :
54+ - test :
55+ filters :
56+ branches :
57+ ignore :
58+ - master
59+
60+ # MERGE TO MASTER
61+ build-test-deploy :
62+ jobs :
63+ - deploy :
64+ filters :
65+ branches :
66+ only : master
You can’t perform that action at this time.
0 commit comments