diff --git a/README.md b/README.md index ca5fb4754..c8c5b5655 100644 --- a/README.md +++ b/README.md @@ -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 ``` @@ -37,7 +37,7 @@ jobs: - name: Setup dotnet uses: actions/setup-dotnet@v1 with: - version: ${{ matrix.dotnet }} + dotnet-version: ${{ matrix.dotnet }} - run: dotnet build ``` diff --git a/action.yml b/action.yml index f33b2b6ca..8e39ac972 100644 --- a/action.yml +++ b/action.yml @@ -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' diff --git a/lib/setup-dotnet.js b/lib/setup-dotnet.js index 7983c51ae..17d922cc2 100644 --- a/lib/setup-dotnet.js +++ b/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(); diff --git a/src/setup-dotnet.ts b/src/setup-dotnet.ts index 212d01bbe..8e491e931 100644 --- a/src/setup-dotnet.ts +++ b/src/setup-dotnet.ts @@ -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();