File tree Expand file tree Collapse file tree 4 files changed +35
-51
lines changed
Expand file tree Collapse file tree 4 files changed +35
-51
lines changed Original file line number Diff line number Diff line change 1+ name : ' Setup .NET Environment'
2+ description : ' Set up .NET SDK and configure dependency caching for faster builds'
3+ inputs :
4+ dotnet-version :
5+ description : ' Specific .NET version(s) to install'
6+ required : false
7+ default : ' '
8+ use-global-json :
9+ description : ' Use global.json file for .NET version'
10+ required : false
11+ default : ' true'
12+ runs :
13+ using : ' composite'
14+ steps :
15+ - name : Setup dotnet SDK
16+ uses : actions/setup-dotnet@v5
17+ with :
18+ dotnet-version : ${{ inputs.dotnet-version || '' }}
19+ global-json-file : ${{ inputs.use-global-json == 'true' && 'global.json' || '' }}
20+
21+ - name : Set up dependency caching for faster builds
22+ uses : actions/cache@v4
23+ id : nuget-cache
24+ with :
25+ path : |
26+ ~/.nuget/packages
27+ ${{ github.workspace }}/**/obj/project.assets.json
28+ key : ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
29+ restore-keys : |
30+ ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
31+ ${{ runner.os }}-nuget-
Original file line number Diff line number Diff line change 2121 - name : Checkout code
2222 uses : actions/checkout@v5
2323
24- - name : Setup Node.js
25- uses : actions/setup-node@v4
26- with :
27- node-version : ' 20'
28- cache : ' npm'
24+ - name : Setup .NET environment
25+ uses : ./.github/actions/setup-dotnet
2926
30- - name : Install JavaScript dependencies
31- run : npm ci
32-
33- - name : Setup dotnet SDK
34- uses : actions/setup-dotnet@v5
35- with :
36- global-json-file : global.json
37-
38- - name : Set up dependency caching for faster builds
39- uses : actions/cache@v4
40- id : nuget-cache
41- with :
42- path : |
43- ~/.nuget/packages
44- ${{ github.workspace }}/**/obj/project.assets.json
45- key : ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
46- restore-keys : |
47- ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
48- ${{ runner.os }}-nuget-
27+ - name : Restore dependencies
28+ run : dotnet restore
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments