@@ -22,33 +22,23 @@ runs:
2222 - name : Setup Corepack and Yarn
2323 run : |
2424 corepack enable
25- corepack prepare yarn@3.6.1 --activate
25+ corepack prepare yarn@4.9.2 --activate
26+ yarn --version
2627 shell : bash
2728
28- # Create required directory and install plugins
29- - name : Setup plugins
29+ - name : Configure Yarn and Generate .yarnrc.yml
3030 run : |
31- mkdir -p .yarn/plugins
32- yarn plugin import @yarnpkg/plugin-interactive-tools
33- yarn plugin import @yarnpkg/plugin-workspace-tools
31+ yarn set version 4.9.2
32+ yarn config set nodeLinker node-modules
33+ yarn config set nmHoistingLimits workspaces
3434 shell : bash
3535
36- # Now update .yarnrc.yml to include the plugins
37- - name : Update Yarn config with plugins
36+ - name : Verify .yarnrc.yml
3837 run : |
39- cat > .yarnrc.yml << EOF
40- nodeLinker: node-modules
41- nmHoistingLimits: workspaces
42-
43- plugins:
44- - path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
45- spec: "@yarnpkg/plugin-interactive-tools"
46- - path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
47- spec: "@yarnpkg/plugin-workspace-tools"
48- EOF
38+ cat .yarnrc.yml
4939 shell : bash
5040
51- - name : Restore cache
41+ - name : Restore Yarn Cache
5242 uses : actions/cache/restore@v4
5343 id : yarn-cache
5444 with :
6656 run : yarn install
6757 shell : bash
6858
69- - name : Save cache
59+ - name : Save Yarn Cache
7060 uses : actions/cache/save@v4
7161 if : steps.yarn-cache.outputs.cache-hit != 'true'
7262 with :
7565 .yarn/cache
7666 .yarn/unplugged
7767 .yarn/install-state.gz
78- key : ${{ steps.yarn-cache.outputs.cache-primary-key || format('{0}-yarn-{1}-{2}', runner.os, hashFiles('yarn.lock'), hashFiles('**/package.json', '!node_modules/**')) }}
68+ key : ${{ steps.yarn-cache.outputs.cache-primary-key }}
0 commit comments