Skip to content

Commit

Permalink
Use nuget caching in dotnet restore for CziShrink
Browse files Browse the repository at this point in the history
  • Loading branch information
m-ringler committed Nov 14, 2023
1 parent 0c0986c commit 69956b7
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/czishrink_dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
working-directory: czishrink
name: ${{matrix.config.os}}-${{matrix.build}}
runs-on: ${{matrix.config.os}}
env:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages

strategy:
fail-fast: false
Expand Down Expand Up @@ -67,9 +69,17 @@ jobs:
$versionElement.'#text' += '+${{ github.run_id }}'
$xml.Save($file.FullName)
shell: pwsh

Check failure on line 72 in .github/workflows/czishrink_dotnet.yml

View workflow job for this annotation

GitHub Actions / MegaLinter

72:1 [trailing-spaces] trailing spaces
- name: Cache nugets
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/.nuget/packages
key: ${{ runner.os }}-czishrink-nuget-${{ hashFiles('czishrink/**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-czishrink-nuget-
- name: Restore dependencies
run: dotnet restore
run: dotnet restore --locked-mode

- name: Build
run: dotnet build --no-restore -c ${{ matrix.build }}
Expand Down

0 comments on commit 69956b7

Please sign in to comment.