From 6e62e60a6f2af6946c19fd6aed7d3d8e980cc8d1 Mon Sep 17 00:00:00 2001 From: Danny McCormick Date: Mon, 12 Aug 2019 14:40:04 -0400 Subject: [PATCH 1/3] Update action name --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index e573842..f33b2b6 100644 --- a/action.yml +++ b/action.yml @@ -1,4 +1,4 @@ -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: From 10a142b9ea98a57a477b5148ec27fa29405f23fc Mon Sep 17 00:00:00 2001 From: Danny McCormick Date: Mon, 12 Aug 2019 15:11:11 -0400 Subject: [PATCH 2/3] Add badge --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 1f0aa97..ca5fb47 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ # setup-dotnet +

+ GitHub Actions status +

+ 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 From fe9489df580ee62bc4638711b73f13670f274ffa Mon Sep 17 00:00:00 2001 From: Danny McCormick Date: Tue, 13 Aug 2019 16:05:52 -0400 Subject: [PATCH 3/3] Use dotnet-version (#16) --- README.md | 4 ++-- action.yml | 5 ++++- lib/setup-dotnet.js | 5 ++++- src/setup-dotnet.ts | 5 ++++- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ca5fb47..c8c5b56 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 f33b2b6..8e39ac9 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 7983c51..17d922c 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 212d01b..8e491e9 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();