@@ -12,12 +12,12 @@ jobs: # a collection of steps
12
12
steps :
13
13
- checkout
14
14
- restore_cache : # special step to restore the dependency cache
15
- key : dependency-cache-{{ checksum "package-lock.json" }}
15
+ key : dependency-cache-{{ .Environment.CIRCLE_WORKFLOW_ID }}
16
16
- run :
17
17
name : Install NPM Dependencies
18
18
command : npm i
19
19
- save_cache : # special step to save the dependency cache
20
- key : dependency-cache-{{ checksum "package-lock.json" }}
20
+ key : dependency-cache-{{ .Environment.CIRCLE_WORKFLOW_ID }}
21
21
paths :
22
22
- ~/tmp/node_modules
23
23
@@ -26,7 +26,7 @@ jobs: # a collection of steps
26
26
steps :
27
27
- checkout
28
28
- restore_cache :
29
- key : dependency-cache-{{ checksum "package-lock.json" }}
29
+ key : dependency-cache-{{ .Environment.CIRCLE_WORKFLOW_ID }}
30
30
- run : # run linter
31
31
name : Linting
32
32
command : npm run lint:ci
@@ -40,7 +40,7 @@ jobs: # a collection of steps
40
40
steps :
41
41
- checkout
42
42
- restore_cache :
43
- key : dependency-cache-{{ checksum "package-lock.json" }}
43
+ key : dependency-cache-{{ .Environment.CIRCLE_WORKFLOW_ID }}
44
44
- run :
45
45
name : Add Git User details
46
46
command : |
@@ -50,18 +50,20 @@ jobs: # a collection of steps
50
50
name : Bump version and generate changelog
51
51
command : npm run release:ci
52
52
- save_cache : # special step to save the changelog
53
- key : changelog-cache-{{ checksum "package-lock.json" }}
53
+ key : changelog-cache-{{ .Environment.CIRCLE_WORKFLOW_ID }}
54
54
paths :
55
55
- ~/tmp/CHANGELOG.md
56
+ - ~/tmp/package-lock.json
57
+ - ~/tmp/package.json
56
58
57
59
build : # build the project - requires dependencies to have been installed
58
60
executor : node-project
59
61
steps :
60
62
- checkout
61
63
- restore_cache :
62
- key : dependency-cache-{{ checksum "package-lock.json" }}
64
+ key : dependency-cache-{{ .Environment.CIRCLE_WORKFLOW_ID }}
63
65
- restore_cache :
64
- key : changelog-cache-{{ checksum "package-lock.json" }}
66
+ key : changelog-cache-{{ .Environment.CIRCLE_WORKFLOW_ID }}
65
67
- run : # run build
66
68
name : Build
67
69
command : |
@@ -83,7 +85,7 @@ jobs: # a collection of steps
83
85
- restore_cache : # restore the /public folder and associated deploy files
84
86
key : deploy-cache-{{ .Environment.CIRCLE_WORKFLOW_ID }}
85
87
- restore_cache : # special step to restore the dependency cache
86
- key : dependency-cache-{{ checksum "package-lock.json" }}
88
+ key : dependency-cache-{{ .Environment.CIRCLE_WORKFLOW_ID }}
87
89
- run :
88
90
name : Deploy to Firebase Hosting
89
91
command : ./node_modules/.bin/firebase deploy --token "$FIREBASE_TOKEN"
0 commit comments