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:
1414
1515 steps :
1616 - uses : actions/checkout@v3
17+ - uses : petesramek/templates/build
1718 - name : Install .NET 9
1819 uses : actions/setup-dotnet@v4
1920 with :
2021 dotnet-version : 9.x
2122 - name : Restore
22- run : dotnet restore
23+ run : dotnet restore ./src/**/*.csproj
2324 - name : Build
2425 run : dotnet build ./src/**/*.csproj --no-restore --configuration Release
2526 - name : Upload
You can’t perform that action at this time.
0 commit comments