cache nuget packages in the dotnet.yml action

This commit is contained in:
Mihail Gribkov
2025-03-01 23:58:33 +03:00
committed by GitHub
parent 7fb537fd72
commit 81e49f7e9e

View File

@@ -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 }}