diff --git a/.github/workflows/czishrink_dotnet.yml b/.github/workflows/czishrink_dotnet.yml index 1da97f3..26ac60e 100644 --- a/.github/workflows/czishrink_dotnet.yml +++ b/.github/workflows/czishrink_dotnet.yml @@ -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 @@ -67,9 +69,17 @@ jobs: $versionElement.'#text' += '+${{ github.run_id }}' $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/**/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 }}