diff --git a/README.md b/README.md
index 1f0aa97..c8c5b56 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,9 @@
# setup-dotnet
+
+
+
+
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
```
@@ -33,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 e573842..8e39ac9 100644
--- a/action.yml
+++ b/action.yml
@@ -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'
diff --git a/lib/setup-dotnet.js b/lib/setup-dotnet.js
index 0eda2a6..ac9a8c9 100644
--- a/lib/setup-dotnet.js
+++ b/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');
diff --git a/src/setup-dotnet.ts b/src/setup-dotnet.ts
index 515dad6..6fdc257 100644
--- a/src/setup-dotnet.ts
+++ b/src/setup-dotnet.ts
@@ -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');