Skip to content

Commit

Permalink
cache nuget packages in build
Browse files Browse the repository at this point in the history
  • Loading branch information
Barsonax committed May 24, 2024
1 parent 1488afb commit 03f71b3
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,17 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
global-json-file: global.json
- name: Cache nuget packages
id: cache-nuget
uses: actions/cache@v4
with:
path: |
~/.nuget/packages
**/obj/*
key: ${{ runner.os }}-nuget_obj-${{ hashFiles('**/*.csproj', 'global.json', 'Directory.Build.props') }}
- name: Restore dependencies
if: steps.cache-nuget.outputs.cache-hit != 'true'
run: dotnet restore
- name: Build
run: dotnet build --no-restore
Expand Down

0 comments on commit 03f71b3

Please sign in to comment.