File tree Expand file tree Collapse file tree 4 files changed +17
-4
lines changed Expand file tree Collapse file tree 4 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 1
1
# setup-dotnet
2
2
3
+ <p align =" left " >
4
+ <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 >
5
+ </p >
6
+
3
7
This action sets up a dotnet environment for use in actions by:
4
8
5
9
- optionally downloading and caching a version of dotnet by SDK version and adding to PATH
15
19
- uses : actions/checkout@master
16
20
- uses : actions/setup-dotnet@v1
17
21
with :
18
- version : ' 2.2.103' // SDK Version to use.
22
+ dotnet- version : ' 2.2.103' // SDK Version to use.
19
23
- run : dotnet build <my project>
20
24
` ` `
21
25
33
37
- name : Setup dotnet
34
38
uses : actions/setup-dotnet@v1
35
39
with :
36
- version : ${{ matrix.dotnet }}
40
+ dotnet- version : ${{ matrix.dotnet }}
37
41
- run : dotnet build <my project>
38
42
` ` `
39
43
Original file line number Diff line number Diff line change 1
- name : ' Setup Dotnet for use with actions '
1
+ name : ' Setup Dotnet environment '
2
2
description : ' Setup a Dotnet environment and add it to the PATH, additionally providing proxy support'
3
3
author : ' GitHub'
4
4
inputs :
5
- version :
5
+ dotnet- version :
6
6
description : ' SDK version to use. E.g. 2.2.104'
7
+ # Deprecated option, do not use. Will not be supported after October 1, 2019
8
+ version :
9
+ description : ' Deprecated. Use dotnet-version instead. Will not be supported after October 1, 2019'
7
10
runs :
8
11
using : ' node12'
9
12
main : ' lib/setup-dotnet.js'
Original file line number Diff line number Diff line change @@ -27,6 +27,9 @@ function run() {
27
27
// If not supplied then task is still used to setup proxy, auth, etc...
28
28
//
29
29
let version = core . getInput ( 'version' ) ;
30
+ if ( ! version ) {
31
+ version = core . getInput ( 'dotnet-version' ) ;
32
+ }
30
33
if ( ! version ) {
31
34
// Try to fall back to global.json
32
35
core . debug ( 'No version found, trying to find version from global.json' ) ;
Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ export async function run() {
10
10
// If not supplied then task is still used to setup proxy, auth, etc...
11
11
//
12
12
let version : string = core . getInput ( 'version' ) ;
13
+ if ( ! version ) {
14
+ version = core . getInput ( 'dotnet-version' ) ;
15
+ }
13
16
if ( ! version ) {
14
17
// Try to fall back to global.json
15
18
core . debug ( 'No version found, trying to find version from global.json' ) ;
You can’t perform that action at this time.
0 commit comments