mirror of
				https://github.com/actions/setup-node.git
				synced 2025-11-04 01:33:33 +00:00 
			
		
		
		
	add node aliases
This commit is contained in:
		
							parent
							
								
									146c4d84a5
								
							
						
					
					
						commit
						b08c36311d
					
				
							
								
								
									
										32
									
								
								.github/workflows/versions.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										32
									
								
								.github/workflows/versions.yml
									
									
									
									
										vendored
									
									
								
							@ -139,3 +139,35 @@ jobs:
 | 
				
			|||||||
      - name: Verify node
 | 
					      - name: Verify node
 | 
				
			||||||
        run: __tests__/verify-arch.sh "ia32"
 | 
					        run: __tests__/verify-arch.sh "ia32"
 | 
				
			||||||
        shell: bash
 | 
					        shell: bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  node-latest-aliases:
 | 
				
			||||||
 | 
					    runs-on: ${{ matrix.os }}
 | 
				
			||||||
 | 
					    strategy:
 | 
				
			||||||
 | 
					      fail-fast: false
 | 
				
			||||||
 | 
					      matrix:
 | 
				
			||||||
 | 
					        os: [ubuntu-latest, windows-latest, macos-latest]
 | 
				
			||||||
 | 
					        node-version: [current, latest, node, "16.14.2"]
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					      - name: Retrieve version before install
 | 
				
			||||||
 | 
					        run: |
 | 
				
			||||||
 | 
					          version=$(echo $(node --version))
 | 
				
			||||||
 | 
					          echo "::set-output name=NODE_VERSION::$version"
 | 
				
			||||||
 | 
					        id: version
 | 
				
			||||||
 | 
					        shell: bash
 | 
				
			||||||
 | 
					      - uses: actions/checkout@v3
 | 
				
			||||||
 | 
					      - name: Setup Node
 | 
				
			||||||
 | 
					        uses: ./
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          node-version: ${{ matrix.node-version }}
 | 
				
			||||||
 | 
					      - name: Retrieve version after install
 | 
				
			||||||
 | 
					        run: |
 | 
				
			||||||
 | 
					          updatedVersion=$(echo $(node --version))
 | 
				
			||||||
 | 
					          echo "::set-output name=NODE_VERSION_UPDATED::$updatedVersion"
 | 
				
			||||||
 | 
					        id: updatedVersion
 | 
				
			||||||
 | 
					        shell: bash
 | 
				
			||||||
 | 
					      - name: Compare versions
 | 
				
			||||||
 | 
					        if: ${{ steps.version.outputs.NODE_VERSION == steps.version.outputs.NODE_VERSION_UPDATED}}
 | 
				
			||||||
 | 
					        run: |
 | 
				
			||||||
 | 
					          echo "${{steps.updatedVersion.outputs.NODE_VERSION_UPDATED}}"
 | 
				
			||||||
 | 
					          echo "${{steps.version.outputs.NODE_VERSION}}"
 | 
				
			||||||
 | 
					          exit 1
 | 
				
			||||||
							
								
								
									
										9014
									
								
								dist/cache-save/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										9014
									
								
								dist/cache-save/index.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										5203
									
								
								dist/setup/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5203
									
								
								dist/setup/index.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@ -373,6 +373,10 @@ async function queryDistForMatch(
 | 
				
			|||||||
  let versions: string[] = [];
 | 
					  let versions: string[] = [];
 | 
				
			||||||
  let nodeVersions = await getVersionsFromDist();
 | 
					  let nodeVersions = await getVersionsFromDist();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if (versionSpec === 'current' || versionSpec === 'latest' || versionSpec === 'node') {
 | 
				
			||||||
 | 
					    return nodeVersions[0].version
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  nodeVersions.forEach((nodeVersion: INodeVersion) => {
 | 
					  nodeVersions.forEach((nodeVersion: INodeVersion) => {
 | 
				
			||||||
    // ensure this version supports your os and platform
 | 
					    // ensure this version supports your os and platform
 | 
				
			||||||
    if (nodeVersion.files.indexOf(dataFileName) >= 0) {
 | 
					    if (nodeVersion.files.indexOf(dataFileName) >= 0) {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user