Skip to content

Commit 0c53ff6

Browse files
committed
updated codeql workflow for .NET 10
1 parent 5a03d18 commit 0c53ff6

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

.github/workflows/codeql.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,15 @@ jobs:
2929
- name: Checkout
3030
uses: actions/checkout@v4
3131

32-
- name: Setup .NET 9 SDK
32+
- name: Setup .NET 10 SDK
3333
uses: actions/setup-dotnet@v4
3434
with:
35-
dotnet-version: 9.0.x
35+
dotnet-version: 10.0.x
36+
cache: true
37+
cache-dependency-path: |
38+
**/*.sln
39+
**/*.slnx
40+
**/*.csproj
3641
3742
- name: Initialize CodeQL
3843
uses: github/codeql-action/init@v3
@@ -44,9 +49,18 @@ jobs:
4449

4550
- name: Manual build fallback
4651
if: failure()
52+
shell: pwsh
4753
run: |
48-
dotnet restore
49-
dotnet build --configuration Release --no-restore
54+
$projects = Get-ChildItem -Recurse -Filter *.csproj -File
55+
if (-not $projects) { Write-Host "No csproj files found"; exit 1 }
56+
foreach ($p in $projects) {
57+
echo "Restoring $($p.FullName)"
58+
dotnet restore --nologo "$($p.FullName)"
59+
}
60+
foreach ($p in $projects) {
61+
echo "Building $($p.FullName)"
62+
dotnet build "$($p.FullName)" --configuration Release --no-restore /p:ContinuousIntegrationBuild=true
63+
}
5064
5165
- name: Perform CodeQL Analysis
5266
uses: github/codeql-action/analyze@v3

0 commit comments

Comments
 (0)