From ab98056c261161df5d2a6b595c32fe0e5fd3dbc2 Mon Sep 17 00:00:00 2001 From: Matthew Jorgensen Date: Mon, 3 Apr 2023 16:06:53 -0500 Subject: [PATCH] Cache nuget packages --- .github/workflows/dotnet-release.yml | 12 ++++++++++++ .github/workflows/dotnet.yml | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/.github/workflows/dotnet-release.yml b/.github/workflows/dotnet-release.yml index 4ed9ccd..c360a29 100644 --- a/.github/workflows/dotnet-release.yml +++ b/.github/workflows/dotnet-release.yml @@ -12,6 +12,12 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 + - uses: actions/cache@v3 + with: + path: ~/.nuget/packages + key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} + restore-keys: | + ${{ runner.os }}-nuget- - name: Setup .NET uses: actions/setup-dotnet@v3 with: @@ -47,6 +53,12 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 + - uses: actions/cache@v3 + with: + path: ~/.nuget/packages + key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} + restore-keys: | + ${{ runner.os }}-nuget- - name: Setup .NET uses: actions/setup-dotnet@v3 with: diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index cd2cfe7..7a1b057 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -29,6 +29,12 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 + - uses: actions/cache@v3 + with: + path: ~/.nuget/packages + key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} + restore-keys: | + ${{ runner.os }}-nuget- - name: Setup .NET uses: actions/setup-dotnet@v3 with: