Skip to content

Commit 74ef050

Browse files
committed
Switch to NuGet restore in workflow
Replaces MSBuild package restore with NuGet restore in the GitHub Actions workflow. Adds NuGet setup step and updates repository handling messages for clarity.
1 parent 70daafd commit 74ef050

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/generation.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ jobs:
2323
- name: Setup MSBuild
2424
uses: microsoft/setup-msbuild@v2
2525

26+
- name: Setup NuGet.exe for use with actions
27+
uses: NuGet/setup-nuget@v2.0.1
28+
2629
- name: Create Repositories directory
2730
run: mkdir Repositories
2831

@@ -62,8 +65,7 @@ jobs:
6265
Write-Host "✓ Found .sln file in $repo_name - keeping repository"
6366
$repo_name | Add-Content "valid_repos.txt" -Encoding UTF8
6467
} else {
65-
Write-Host "✗ No .sln file found in base folder of $repo_name - removing repository"
66-
Remove-Item "Repositories\$repo_name" -Recurse -Force
68+
Write-Host "✗ No .sln file found in base folder of $repo_name - Repo not built"
6769
}
6870
} catch {
6971
Write-Host "Failed to clone $repo_name"
@@ -116,8 +118,7 @@ jobs:
116118
117119
# Restore packages with MSBuild/NuGet
118120
Write-Host "Restoring packages with MSBuild..."
119-
msbuild $_.Name -t:Restore /p:Configuration=Release 2>&1 | Tee-Object -Variable restoreOutput
120-
Write-Host $restoreOutput
121+
nuget restore $_.Name
121122
122123
# Try with MSBuild as fallback
123124
msbuild $_.Name /p:Configuration=Release /p:Platform="Any CPU" /m 2>&1 | Tee-Object -Variable msbuildOutput

0 commit comments

Comments
 (0)