cache nuget packages in the dotnet.yml action
This commit is contained in:
4
.github/workflows/dotnet.yml
vendored
4
.github/workflows/dotnet.yml
vendored
@@ -29,6 +29,8 @@ jobs:
|
|||||||
uses: actions/setup-dotnet@v4
|
uses: actions/setup-dotnet@v4
|
||||||
with:
|
with:
|
||||||
dotnet-version: 9.0.x
|
dotnet-version: 9.0.x
|
||||||
|
cache: true
|
||||||
|
cache-dependency-path: "**/packages.lock.json"
|
||||||
|
|
||||||
- name: Is Tag Build
|
- name: Is Tag Build
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
@@ -39,7 +41,7 @@ jobs:
|
|||||||
run: echo "Suffix=$(date +'%Y%m%d')-${{ github.run_number }}" >> $GITHUB_ENV
|
run: echo "Suffix=$(date +'%Y%m%d')-${{ github.run_number }}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Restore
|
- 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
|
- name: Build
|
||||||
run: dotnet build "Discord.Net.sln" -v minimal -c Release --no-restore /p:BuildNumber=${{ env.Suffix }} /p:IsTagBuild=${{ env.IsTagBuild }}
|
run: dotnet build "Discord.Net.sln" -v minimal -c Release --no-restore /p:BuildNumber=${{ env.Suffix }} /p:IsTagBuild=${{ env.IsTagBuild }}
|
||||||
|
|||||||
Reference in New Issue
Block a user