From 8003390aa23afdc1cf6b4858b181681f1db19606 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 8 Mar 2026 18:10:26 +0000 Subject: [PATCH] ci: cache NuGet packages to speed up builds Add actions/cache@v4 to cache the ~/.nuget/packages directory, keyed on paket.lock hash. This avoids re-downloading packages on every CI run, which should significantly reduce build times on cache hits. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/dotnet.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 9e44ace3..e5aade0d 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -39,6 +39,13 @@ jobs: uses: actions/setup-dotnet@v5 with: dotnet-version: ${{ matrix.dotnet }} + - name: Cache NuGet packages + uses: actions/cache@v4 + with: + path: ~/.nuget/packages + key: ${{ runner.os }}-nuget-${{ hashFiles('**/paket.lock') }} + restore-keys: | + ${{ runner.os }}-nuget- - name: Install local tools run: dotnet tool restore - name: Paket Restore