From 81e49f7e9efe25f2f3e2d1127cab920b00a6aafb Mon Sep 17 00:00:00 2001 From: Mihail Gribkov <61027276+Misha-133@users.noreply.github.com> Date: Sat, 1 Mar 2025 23:58:33 +0300 Subject: [PATCH] cache nuget packages in the dotnet.yml action --- .github/workflows/dotnet.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index f0b56b3f..85b3d420 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -29,6 +29,8 @@ jobs: uses: actions/setup-dotnet@v4 with: dotnet-version: 9.0.x + cache: true + cache-dependency-path: "**/packages.lock.json" - name: Is Tag Build if: startsWith(github.ref, 'refs/tags/') @@ -39,7 +41,7 @@ jobs: run: echo "Suffix=$(date +'%Y%m%d')-${{ github.run_number }}" >> $GITHUB_ENV - name: Restore - run: dotnet restore ./Discord.Net.sln -v minimal + run: dotnet restore ./Discord.Net.sln -v minimal --locked-mode /p:RestorePackagesWithLockFile=true - name: Build run: dotnet build "Discord.Net.sln" -v minimal -c Release --no-restore /p:BuildNumber=${{ env.Suffix }} /p:IsTagBuild=${{ env.IsTagBuild }}