mirror of
				https://github.com/actions/setup-dotnet.git
				synced 2025-10-31 19:43:46 +00:00 
			
		
		
		
	Merge branch 'master' into global-json
This commit is contained in:
		
						commit
						553ff3fdfc
					
				| @ -1,5 +1,9 @@ | ||||
| # setup-dotnet | ||||
| 
 | ||||
| <p align="left"> | ||||
|   <a href="https://github.com/actions/setup-dotnet"><img alt="GitHub Actions status" src="https://github.com/actions/setup-dotnet/workflows/Main%20workflow/badge.svg"></a> | ||||
| </p> | ||||
| 
 | ||||
| This action sets up a dotnet environment for use in actions by: | ||||
| 
 | ||||
| - optionally downloading and caching a version of dotnet by SDK version and adding to PATH | ||||
| @ -15,7 +19,7 @@ steps: | ||||
| - uses: actions/checkout@master | ||||
| - uses: actions/setup-dotnet@v1 | ||||
|   with: | ||||
|     version: '2.2.103' // SDK Version to use. | ||||
|     dotnet-version: '2.2.103' // SDK Version to use. | ||||
| - run: dotnet build <my project> | ||||
| ``` | ||||
| 
 | ||||
| @ -33,7 +37,7 @@ jobs: | ||||
|       - name: Setup dotnet | ||||
|         uses: actions/setup-dotnet@v1 | ||||
|         with: | ||||
|           version: ${{ matrix.dotnet }} | ||||
|           dotnet-version: ${{ matrix.dotnet }} | ||||
|       - run: dotnet build <my project> | ||||
| ``` | ||||
| 
 | ||||
|  | ||||
| @ -1,9 +1,12 @@ | ||||
| name: 'Setup Dotnet for use with actions' | ||||
| name: 'Setup Dotnet environment' | ||||
| description: 'Setup a Dotnet environment and add it to the PATH, additionally providing proxy support' | ||||
| author: 'GitHub' | ||||
| inputs:  | ||||
|   version: | ||||
|   dotnet-version: | ||||
|     description: 'SDK version to use. E.g. 2.2.104' | ||||
| # Deprecated option, do not use. Will not be supported after October 1, 2019 | ||||
|   version: | ||||
|     description: 'Deprecated. Use dotnet-version instead. Will not be supported after October 1, 2019' | ||||
| runs: | ||||
|   using: 'node12' | ||||
|   main: 'lib/setup-dotnet.js' | ||||
|  | ||||
| @ -27,6 +27,9 @@ function run() { | ||||
|             // If not supplied then task is still used to setup proxy, auth, etc...
 | ||||
|             //
 | ||||
|             let version = core.getInput('version'); | ||||
|             if (!version) { | ||||
|               version = core.getInput('dotnet-version'); | ||||
|             } | ||||
|             if (!version) { | ||||
|                 // Try to fall back to global.json
 | ||||
|                 core.debug('No version found, trying to find version from global.json'); | ||||
|  | ||||
| @ -10,6 +10,9 @@ export async function run() { | ||||
|     // If not supplied then task is still used to setup proxy, auth, etc...
 | ||||
|     //
 | ||||
|     let version: string = core.getInput('version'); | ||||
|     if (!version) { | ||||
|       version = core.getInput('dotnet-version'); | ||||
|     } | ||||
|     if (!version) { | ||||
|       // Try to fall back to global.json
 | ||||
|       core.debug('No version found, trying to find version from global.json'); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user