mirror of
				https://github.com/actions/setup-node.git
				synced 2025-11-04 12:13:35 +00:00 
			
		
		
		
	Update README.md
This commit is contained in:
		
							parent
							
								
									be39605a65
								
							
						
					
					
						commit
						584e5770f9
					
				
							
								
								
									
										21
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										21
									
								
								README.md
									
									
									
									
									
								
							@ -19,10 +19,10 @@ steps:
 | 
				
			|||||||
- uses: actions/checkout@v2
 | 
					- uses: actions/checkout@v2
 | 
				
			||||||
- uses: actions/setup-node@v2
 | 
					- uses: actions/setup-node@v2
 | 
				
			||||||
  with:
 | 
					  with:
 | 
				
			||||||
    node-version: '14'
 | 
					    node-version: 16
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
The action will first check the local cache for a semver match. The hosted images have been updated with the latest of each LTS from v8, v10, v12, and v14. `self-hosted` machines will benefit from the cache as well only downloading once. The action will pull LTS versions from [node-versions releases](https://github.com/actions/node-versions/releases) and on miss or failure will fall back to the previous behavior of downloading directly from [node dist](https://nodejs.org/dist/).
 | 
					The action will first check the local cache for a semver match. The hosted images have been updated with the latest of each LTS from v8, v10, v12, v16, and v16. `self-hosted` machines will benefit from the cache as well only downloading once. The action will pull LTS versions from [node-versions releases](https://github.com/actions/node-versions/releases) and on miss or failure will fall back to the previous behavior of downloading directly from [node dist](https://nodejs.org/dist/).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
The `node-version` input is optional. If not supplied, the node version that is PATH will be used. However, this action will still register problem matchers and support auth features. So setting up the node environment is still a valid scenario without downloading and caching versions.
 | 
					The `node-version` input is optional. If not supplied, the node version that is PATH will be used. However, this action will still register problem matchers and support auth features. So setting up the node environment is still a valid scenario without downloading and caching versions.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -36,7 +36,7 @@ steps:
 | 
				
			|||||||
- uses: actions/checkout@v2
 | 
					- uses: actions/checkout@v2
 | 
				
			||||||
- uses: actions/setup-node@v2
 | 
					- uses: actions/setup-node@v2
 | 
				
			||||||
  with:
 | 
					  with:
 | 
				
			||||||
    node-version: '14'
 | 
					    node-version: 16
 | 
				
			||||||
- run: npm install
 | 
					- run: npm install
 | 
				
			||||||
- run: npm test
 | 
					- run: npm test
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
@ -54,7 +54,7 @@ steps:
 | 
				
			|||||||
- uses: actions/checkout@v2
 | 
					- uses: actions/checkout@v2
 | 
				
			||||||
- uses: actions/setup-node@v2
 | 
					- uses: actions/setup-node@v2
 | 
				
			||||||
  with:
 | 
					  with:
 | 
				
			||||||
    node-version: '14'
 | 
					    node-version: 16
 | 
				
			||||||
    check-latest: true
 | 
					    check-latest: true
 | 
				
			||||||
- run: npm install
 | 
					- run: npm install
 | 
				
			||||||
- run: npm test
 | 
					- run: npm test
 | 
				
			||||||
@ -67,7 +67,7 @@ jobs:
 | 
				
			|||||||
    runs-on: ubuntu-16.04
 | 
					    runs-on: ubuntu-16.04
 | 
				
			||||||
    strategy:
 | 
					    strategy:
 | 
				
			||||||
      matrix:
 | 
					      matrix:
 | 
				
			||||||
        node: [ '12', '14' ]
 | 
					        node: [12, 14, 16]
 | 
				
			||||||
    name: Node ${{ matrix.node }} sample
 | 
					    name: Node ${{ matrix.node }} sample
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - uses: actions/checkout@v2
 | 
					      - uses: actions/checkout@v2
 | 
				
			||||||
@ -93,7 +93,7 @@ jobs:
 | 
				
			|||||||
      - uses: actions/checkout@v2
 | 
					      - uses: actions/checkout@v2
 | 
				
			||||||
      - uses: actions/setup-node@v2
 | 
					      - uses: actions/setup-node@v2
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          node-version: '14'
 | 
					          node-version: 16
 | 
				
			||||||
          architecture: 'x64' # optional, x64 or x86. If not specified, x64 will be used by default
 | 
					          architecture: 'x64' # optional, x64 or x86. If not specified, x64 will be used by default
 | 
				
			||||||
      - run: npm install
 | 
					      - run: npm install
 | 
				
			||||||
      - run: npm test
 | 
					      - run: npm test
 | 
				
			||||||
@ -115,12 +115,13 @@ jobs:
 | 
				
			|||||||
          - 10
 | 
					          - 10
 | 
				
			||||||
          - 12
 | 
					          - 12
 | 
				
			||||||
          - 14
 | 
					          - 14
 | 
				
			||||||
 | 
					          - 16
 | 
				
			||||||
        architecture:
 | 
					        architecture:
 | 
				
			||||||
          - x64
 | 
					          - x64
 | 
				
			||||||
        # an extra windows-x86 run:
 | 
					        # an extra windows-x86 run:
 | 
				
			||||||
        include:
 | 
					        include:
 | 
				
			||||||
          - os: windows-2016
 | 
					          - os: windows-2016
 | 
				
			||||||
            node_version: 12
 | 
					            node_version: 16
 | 
				
			||||||
            architecture: x86
 | 
					            architecture: x86
 | 
				
			||||||
    name: Node ${{ matrix.node_version }} - ${{ matrix.architecture }} on ${{ matrix.os }}
 | 
					    name: Node ${{ matrix.node_version }} - ${{ matrix.architecture }} on ${{ matrix.os }}
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
@ -140,7 +141,7 @@ steps:
 | 
				
			|||||||
- uses: actions/checkout@v2
 | 
					- uses: actions/checkout@v2
 | 
				
			||||||
- uses: actions/setup-node@v2
 | 
					- uses: actions/setup-node@v2
 | 
				
			||||||
  with:
 | 
					  with:
 | 
				
			||||||
    node-version: '10.x'
 | 
					    node-version: 16
 | 
				
			||||||
    registry-url: 'https://registry.npmjs.org'
 | 
					    registry-url: 'https://registry.npmjs.org'
 | 
				
			||||||
- run: npm install
 | 
					- run: npm install
 | 
				
			||||||
- run: npm publish
 | 
					- run: npm publish
 | 
				
			||||||
@ -160,7 +161,7 @@ steps:
 | 
				
			|||||||
- uses: actions/checkout@v2
 | 
					- uses: actions/checkout@v2
 | 
				
			||||||
- uses: actions/setup-node@v2
 | 
					- uses: actions/setup-node@v2
 | 
				
			||||||
  with:
 | 
					  with:
 | 
				
			||||||
    node-version: '10.x'
 | 
					    node-version: 16
 | 
				
			||||||
    registry-url: <registry url>
 | 
					    registry-url: <registry url>
 | 
				
			||||||
- run: yarn install
 | 
					- run: yarn install
 | 
				
			||||||
- run: yarn publish
 | 
					- run: yarn publish
 | 
				
			||||||
@ -180,7 +181,7 @@ steps:
 | 
				
			|||||||
- uses: actions/checkout@v2
 | 
					- uses: actions/checkout@v2
 | 
				
			||||||
- uses: actions/setup-node@v2
 | 
					- uses: actions/setup-node@v2
 | 
				
			||||||
  with:
 | 
					  with:
 | 
				
			||||||
    node-version: '10.x'
 | 
					    node-version: 16
 | 
				
			||||||
    registry-url: 'https://registry.npmjs.org'
 | 
					    registry-url: 'https://registry.npmjs.org'
 | 
				
			||||||
# Skip post-install scripts here, as a malicious
 | 
					# Skip post-install scripts here, as a malicious
 | 
				
			||||||
# script could steal NODE_AUTH_TOKEN.
 | 
					# script could steal NODE_AUTH_TOKEN.
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user