File tree Expand file tree Collapse file tree 2 files changed +39
-1
lines changed Expand file tree Collapse file tree 2 files changed +39
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : ' Build with .NET SDK'
2
+ description : ' Build solution or projects with specific version of .NET SDK.'
3
+
4
+ inputs :
5
+ search-pattern : # Solution(s) or project(s) to build e.g. src/**/*.csproj
6
+ description : ' Solution(s) or project(s) to build e.g. src/**/*.csproj'
7
+ required : true
8
+ default : ' **/*.*'
9
+ dotnet-version : # .NET version(s) to be installed
10
+ description : ' .NET version(s) to be installed'
11
+ required : false
12
+ default : ' 9.x'
13
+ configuration :
14
+ description : ' Build Configuration'
15
+ required : false
16
+ default : ' Release'
17
+ platform :
18
+ description : ' Build Platform'
19
+ required : false
20
+ default : ' AnyCPU'
21
+
22
+ runs :
23
+ using : " composite"
24
+ steps :
25
+ - name : Install .NET 9
26
+ uses : actions/setup-dotnet@v4
27
+ with :
28
+ dotnet-version : $DOTNET_VERSION
29
+ - name : Restore
30
+ run : dotnet restore
31
+ - name : Build
32
+ run : dotnet build $SEARCH_PATTERN --no-restore --configuration $CONFIGURATION --platform $PLATFORM
33
+ env :
34
+ SEARCH_PATTERN : ${{ inputs.search-pattern }}
35
+ DOTNET_VERSION : ${{ inputs.dotnet-version }}
36
+ CONFIGURATION : ${{ inputs.configuration }}
37
+ PLATFORM : ${{ inputs.platform }}
Original file line number Diff line number Diff line change @@ -14,12 +14,13 @@ jobs:
14
14
15
15
steps :
16
16
- uses : actions/checkout@v3
17
+ - uses : petesramek/templates/build
17
18
- name : Install .NET 9
18
19
uses : actions/setup-dotnet@v4
19
20
with :
20
21
dotnet-version : 9.x
21
22
- name : Restore
22
- run : dotnet restore
23
+ run : dotnet restore ./src/**/*.csproj
23
24
- name : Build
24
25
run : dotnet build ./src/**/*.csproj --no-restore --configuration Release
25
26
- name : Upload
You can’t perform that action at this time.
0 commit comments