Skip to content

Commit

Permalink
try setting NUGET_PACKAGES differently
Browse files Browse the repository at this point in the history
  • Loading branch information
jetersen committed Dec 9, 2024
1 parent d7b4141 commit 50135dc
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
POWERSHELL_TELEMETRY_OPTOUT: 1
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages

jobs:
build:
Expand All @@ -20,7 +21,6 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-2019, windows-2022]
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
include:
- os: windows-2019
DOTNET_INSTALL_DIR: D:\dotnet
Expand All @@ -34,14 +34,19 @@ jobs:
DOTNET_INSTALL_DIR: ''
cache: [true, false]
fail-fast: false
env:
NUGET_PACKAGES: ${{ matrix.NUGET_PACKAGES }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set Windows Environment Variables
if: startsWith(matrix.os, 'windows') && matrix.DOTNET_INSTALL_DIR != ''
shell: pwsh
run: |
echo "DOTNET_INSTALL_DIR=${{ matrix.DOTNET_INSTALL_DIR }}" >> $ENV:GITHUB_ENV
echo "NUGET_PACKAGES=${{ matrix.NUGET_PACKAGES }}" >> $ENV:GITHUB_ENV
- name: Cache NuGet packages
if: matrix.cache
uses: actions/cache@v4
Expand All @@ -50,11 +55,6 @@ jobs:
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: ${{ runner.os }}-nuget-

- name: Set Windows Environment Variables
if: startsWith(matrix.os, 'windows') && matrix.DOTNET_INSTALL_DIR != ''
shell: pwsh
run: echo "DOTNET_INSTALL_DIR=${{ matrix.DOTNET_INSTALL_DIR }}" >> $ENV:GITHUB_ENV

- name: Setup DotNet 8
uses: actions/setup-dotnet@v4
with:
Expand Down

0 comments on commit 50135dc

Please sign in to comment.