@@ -21,42 +21,72 @@ jobs:
2121 configuration : [Debug, Release, ReleaseLite, Canary, CanaryLite, Nightly, NightlyLite]
2222
2323 steps :
24- - name : Checkout repository
25- uses : actions/checkout@v4
26- with :
27- fetch-depth : 0 # Full history for versioning
28-
29- - name : Setup .NET SDK
30- uses : actions/setup-dotnet@v4
31- with :
32- dotnet-version : |
33- 10.0.x
34- 9.0.x
35- 8.0.x
36- 6.0.x
37-
38- - name : Setup MSBuild
39- uses : microsoft/setup-msbuild@v2
40- with :
41- vs-version : ' latest'
42-
43- - name : Setup NuGet
44- uses : NuGet/setup-nuget@v2
45- with :
46- nuget-version : ' latest'
47-
48- - name : Restore NuGet packages
49- run : nuget restore "Source/Krypton Toolkit/Krypton Toolkit Suite Extended 2022 - VS2022.sln"
50-
51- - name : Build solution
52- run : msbuild "Source/Krypton Toolkit/Krypton Toolkit Suite Extended 2022 - VS2022.sln" /p:Configuration=${{ matrix.configuration }} /p:Platform="Any CPU" /m /v:minimal
53-
54- - name : Upload build artifacts
55- if : matrix.configuration != 'Debug'
56- uses : actions/upload-artifact@v4
57- with :
58- name : Build-${{ matrix.configuration }}
59- path : |
60- Bin/${{ matrix.configuration }}/
61- retention-days : 7
24+ - name : Checkout repository
25+ uses : actions/checkout@v6
26+ with :
27+ fetch-depth : 0 # Full history for versioning
28+
29+ # Extended-Toolkit project refs expect Standard-Toolkit as sibling (..\Standard-Toolkit)
30+ - name : Checkout Standard-Toolkit
31+ run : git clone --depth 1 https://github.com/Krypton-Suite/Standard-Toolkit.git ../Standard-Toolkit
32+
33+ - name : Setup .NET SDK
34+ uses : actions/setup-dotnet@v5
35+ with :
36+ dotnet-version : |
37+ 10.0.x
38+ 9.0.x
39+ 8.0.x
40+ 6.0.x
41+
42+ # .NET 11 (Preview)
43+ - name : Setup .NET 11 (Preview)
44+ uses : actions/setup-dotnet@v5
45+ with :
46+ dotnet-version : 11.0.x
47+ dotnet-quality : preview
48+
49+ # global.json dynamically generate (use latest SDK available)
50+ - name : Force .NET 11 SDK via global.json
51+ run : |
52+ $sdkVersion = (dotnet --list-sdks | Select-String "11.0").ToString().Split(" ")[0]
53+ if (-not $sdkVersion) {
54+ # Fallback to .NET 10 if .NET 11 is not available
55+ $sdkVersion = (dotnet --list-sdks | Select-String "10.0").ToString().Split(" ")[0]
56+ }
57+ Write-Output "Using SDK $sdkVersion"
58+ @"
59+ {
60+ "sdk": {
61+ "version": "$sdkVersion",
62+ "rollForward": "latestFeature"
63+ }
64+ }
65+ "@ | Out-File -Encoding utf8 global.json
66+
67+ - name : Setup MSBuild
68+ uses : microsoft/setup-msbuild@v2
69+ with :
70+ vs-version : ' latest'
71+
72+ - name : Setup NuGet
73+ uses : NuGet/setup-nuget@v2
74+ with :
75+ nuget-version : ' latest'
76+
77+ # Use the non-NuGet solution so projects use ProjectReference to Standard-Toolkit (no Krypton.Standard.Toolkit package on nuget.org)
78+ - name : Restore NuGet packages
79+ run : nuget restore "Source/Krypton Toolkit/Krypton Toolkit Suite Extended 2022 - VS2022.sln"
80+
81+ - name : Build solution
82+ run : msbuild "Source/Krypton Toolkit/Krypton Toolkit Suite Extended 2022 - VS2022.sln" /p:Configuration=${{ matrix.configuration }} /p:Platform="Any CPU" /m /v:minimal
83+
84+ - name : Upload build artifacts
85+ if : matrix.configuration != 'Debug'
86+ uses : actions/upload-artifact@v6
87+ with :
88+ name : Build-${{ matrix.configuration }}
89+ path : |
90+ Bin/${{ matrix.configuration }}/
91+ retention-days : 7
6292
0 commit comments