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 c77db3b commit 1ce3eb8
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 @@ -68,8 +70,16 @@ jobs:
$xml.Save($file.FullName)
shell: pwsh

- name: Cache nugets
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/.nuget/packages
key: ${{ runner.os }}-czishrink-nuget-${{ hashFiles('czishrink/Directory.Packages.props') }}
restore-keys: |
${{ runner.os }}-czishrink-nuget-
- name: Restore dependencies
run: dotnet restore
run: dotnet restore # --locked-mode ## does not work

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

0 comments on commit 1ce3eb8

Please sign in to comment.