Skip to content

Commit cd92337

Browse files
committed
Cache nuget package in the pipline and ensure to consider Directory.build.props file
1 parent d77bf19 commit cd92337

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

.github/workflows/dotnet.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ on:
1414
jobs:
1515
net5_above:
1616
runs-on: ubuntu-latest
17+
defaults:
18+
run:
19+
working-directory: ${{ github.workspace }}
1720
strategy:
1821
matrix:
1922
dotnet-version: [ '8.0', '10.0' ]
@@ -23,6 +26,12 @@ jobs:
2326
uses: actions/setup-dotnet@v5
2427
with:
2528
dotnet-version: ${{ matrix.dotnet-version }}.x
29+
- uses: actions/cache@v4
30+
with:
31+
path: ~/.nuget/packages
32+
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', '**/*.sln') }}
33+
restore-keys: |
34+
${{ runner.os }}-nuget-
2635
- name: Restore dependencies
2736
run: dotnet restore
2837
- name: Build

0 commit comments

Comments
 (0)