Upgrade to Yarn 4, remove support for Node 16 (#27073)
This commit is contained in:
		
							
								
								
									
										27
									
								
								.github/actions/setup-javascript/action.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										27
									
								
								.github/actions/setup-javascript/action.yml
									
									
									
									
										vendored
									
									
								
							@@ -11,9 +11,32 @@ runs:
 | 
			
		||||
    - name: Set up Node.js
 | 
			
		||||
      uses: actions/setup-node@v3
 | 
			
		||||
      with:
 | 
			
		||||
        cache: yarn
 | 
			
		||||
        node-version-file: '.nvmrc'
 | 
			
		||||
 | 
			
		||||
    # The following is needed because we can not use `cache: true` for `setup-node`, as it does not support Corepack yet and mess up with the cache location if ran after Node is installed
 | 
			
		||||
    - name: Enable corepack
 | 
			
		||||
      shell: bash
 | 
			
		||||
      run: corepack enable
 | 
			
		||||
 | 
			
		||||
    - name: Get yarn cache directory path
 | 
			
		||||
      id: yarn-cache-dir-path
 | 
			
		||||
      shell: bash
 | 
			
		||||
      run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
 | 
			
		||||
 | 
			
		||||
    - uses: actions/cache@v3
 | 
			
		||||
      id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
 | 
			
		||||
      with:
 | 
			
		||||
        path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
 | 
			
		||||
        key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
 | 
			
		||||
        restore-keys: |
 | 
			
		||||
          ${{ runner.os }}-yarn-
 | 
			
		||||
 | 
			
		||||
    - name: Install all yarn packages
 | 
			
		||||
      shell: bash
 | 
			
		||||
      run: yarn --frozen-lockfile ${{ inputs.onlyProduction != 'false' && '--production' || '' }}
 | 
			
		||||
      run: yarn install --immutable
 | 
			
		||||
      if: inputs.onlyProduction == 'false'
 | 
			
		||||
 | 
			
		||||
    - name: Install all production yarn packages
 | 
			
		||||
      shell: bash
 | 
			
		||||
      run: yarn workspaces focus --production
 | 
			
		||||
      if: inputs.onlyProduction != 'false'
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user