File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -23,21 +23,23 @@ jobs:
23
23
registry-url : " https://registry.npmjs.org"
24
24
25
25
- name : Get cache directory
26
- id : npm -cache-dir
26
+ id : yarn -cache-dir
27
27
run : |
28
- echo "::set-output name=dir::$(npm config get cache)"
29
-
28
+ echo "::set-output name=dir::$(yarn cache dir )"
29
+
30
30
- name : Restoring cache
31
- uses : actions/cache@v2
32
- id : npm -cache # use this to check for `cache-hit` ==> if: steps.npm -cache.outputs.cache-hit != 'true'
31
+ uses : actions/cache@v3
32
+ id : yarn -cache # use this to check for `cache-hit` ==> if: steps.yarn -cache.outputs.cache-hit != 'true'
33
33
with :
34
- path : ${{ steps.npm -cache-dir.outputs.dir }}
34
+ path : ${{ steps.yarn -cache-dir.outputs.dir }}
35
35
key : ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
36
36
restore-keys : |
37
37
${{ runner.os }}-yarn-
38
38
39
39
- name : Install Packages
40
- run : yarn install --frozen-lockfile --cache-folder .npm --prefer-offline
40
+ # NOTE: The --ignore-scripts flag is required to prevent leakage of NPM_TOKEN value
41
+ # See https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#use-private-packages
42
+ run : yarn install --frozen-lockfile --prefer-offline --ignore-scripts
41
43
42
44
- name : Build
43
45
run : yarn prepack
You can’t perform that action at this time.
0 commit comments