mirror of
https://github.com/actions/setup-dotnet.git
synced 2024-11-22 19:41:08 +07:00
Use dotnet-version (#16)
This commit is contained in:
parent
10a142b9ea
commit
fe9489df58
@ -19,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>
|
||||
```
|
||||
|
||||
@ -37,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>
|
||||
```
|
||||
|
||||
|
@ -2,8 +2,11 @@ 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'
|
||||
|
@ -25,7 +25,10 @@ function run() {
|
||||
// Version is optional. If supplied, install / use from the tool cache
|
||||
// If not supplied then task is still used to setup proxy, auth, etc...
|
||||
//
|
||||
const version = core.getInput('version');
|
||||
let version = core.getInput('version');
|
||||
if (!version) {
|
||||
version = core.getInput('dotnet-version');
|
||||
}
|
||||
if (version) {
|
||||
const dotnetInstaller = new installer.DotnetCoreInstaller(version);
|
||||
yield dotnetInstaller.installDotnet();
|
||||
|
@ -8,7 +8,10 @@ async function run() {
|
||||
// Version is optional. If supplied, install / use from the tool cache
|
||||
// If not supplied then task is still used to setup proxy, auth, etc...
|
||||
//
|
||||
const version = core.getInput('version');
|
||||
let version = core.getInput('version');
|
||||
if (!version) {
|
||||
version = core.getInput('dotnet-version');
|
||||
}
|
||||
if (version) {
|
||||
const dotnetInstaller = new installer.DotnetCoreInstaller(version);
|
||||
await dotnetInstaller.installDotnet();
|
||||
|
Loading…
Reference in New Issue
Block a user