Skip to content

Commit

Permalink
cache nuget packages in the dotnet.yml action
Browse files Browse the repository at this point in the history
  • Loading branch information
Misha-133 authored Mar 1, 2025
1 parent 7fb537f commit 81e49f7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/')
Expand All @@ -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 }}
Expand Down

0 comments on commit 81e49f7

Please sign in to comment.