* White bar is shown in a KryptonForm Sizable without buttons and text
#1273
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE) | |
| # Modifications by Peter Wagner (aka Wagnerp), Simon Coghlan (aka Smurf-IV), tobitege et al. 2025 - 2026. All rights reserved. | |
| name: Build | |
| on: | |
| pull_request: | |
| branches: ['**'] | |
| types: [opened, synchronize, reopened] | |
| push: | |
| branches: | |
| - master | |
| - alpha | |
| - canary | |
| - gold | |
| - V105-LTS | |
| - V85-LTS | |
| paths-ignore: ['.git*', '.vscode'] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| if: github.event_name != 'pull_request' || (github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'workflow_dispatch') | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| # .NET 9 and 10 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: | | |
| 9.0.x | |
| 10.0.x | |
| # global.json dynamically generate | |
| - name: Force .NET 10 SDK via global.json | |
| run: | | |
| $sdkVersion = (dotnet --list-sdks | Select-String "10.0").ToString().Split(" ")[0] | |
| Write-Output "Using SDK $sdkVersion" | |
| @" | |
| { | |
| "sdk": { | |
| "version": "$sdkVersion", | |
| "rollForward": "latestFeature" | |
| } | |
| } | |
| "@ | Out-File -Encoding utf8 global.json | |
| - name: Setup MSBuild | |
| uses: microsoft/setup-msbuild@v2 | |
| with: | |
| msbuild-architecture: x64 | |
| - name: Setup NuGet | |
| uses: NuGet/setup-nuget@v2.0.1 | |
| - name: Cache NuGet | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.nuget/packages | |
| key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} | |
| restore-keys: | | |
| ${{ runner.os }}-nuget- | |
| - name: Restore | |
| run: dotnet restore "Source/Krypton Components/Krypton Toolkit Suite 2022 - VS2022.slnx" | |
| - name: Build | |
| run: msbuild "Scripts/Build/nightly.proj" /t:Rebuild /p:Configuration=Release /p:Platform="Any CPU" | |
| release: | |
| runs-on: windows-latest | |
| if: github.ref == 'refs/heads/master' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') | |
| needs: build | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| # .NET 9 and 10 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: | | |
| 9.0.x | |
| 10.0.x | |
| # global.json dynamically generate | |
| - name: Force .NET 10 SDK via global.json | |
| run: | | |
| $sdkVersion = (dotnet --list-sdks | Select-String "10.0").ToString().Split(" ")[0] | |
| Write-Output "Using SDK $sdkVersion" | |
| @" | |
| { | |
| "sdk": { | |
| "version": "$sdkVersion", | |
| "rollForward": "latestFeature" | |
| } | |
| } | |
| "@ | Out-File -Encoding utf8 global.json | |
| - name: Setup MSBuild | |
| uses: microsoft/setup-msbuild@v2 | |
| with: | |
| msbuild-architecture: x64 | |
| - name: Setup NuGet | |
| uses: NuGet/setup-nuget@v2.0.1 | |
| - name: Cache NuGet | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.nuget/packages | |
| key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} | |
| restore-keys: | | |
| ${{ runner.os }}-nuget- | |
| - name: Setup WebView2 SDK | |
| shell: pwsh | |
| run: | | |
| if (-not (Test-Path "WebView2SDK")) { mkdir WebView2SDK } | |
| $packageId = "Microsoft.Web.WebView2" | |
| $latestVersion = $null | |
| try { | |
| $searchUrl = "https://azuresearch-usnc.nuget.org/query?q=$packageId&prerelease=false&semVerLevel=2.0.0&take=1" | |
| $searchResponse = Invoke-RestMethod -Uri $searchUrl -Method Get | |
| if ($searchResponse.data -and $searchResponse.data.Count -gt 0) { | |
| $latestVersion = $searchResponse.data[0].version | |
| } | |
| } catch { | |
| try { | |
| $apiUrl = "https://api.nuget.org/v3-flatcontainer/$packageId/index.json" | |
| $response = Invoke-RestMethod -Uri $apiUrl -Method Get | |
| if ($response.versions) { | |
| $stableVersions = $response.versions | Where-Object { $_ -notmatch '[-]' -and $_ -match '^\d+\.\d+\.\d+$' } | |
| if ($stableVersions) { | |
| $latestVersion = $stableVersions | Sort-Object { [System.Version]$_ } -Descending | Select-Object -First 1 | |
| } | |
| } | |
| } catch {} | |
| } | |
| if (-not $latestVersion) { $latestVersion = "1.0.3595.46" } | |
| Write-Host "Using WebView2 SDK version: $latestVersion" | |
| dotnet add "Source/Krypton Components/Krypton.Utilities/Krypton.Utilities.csproj" package Microsoft.Web.WebView2 --version $latestVersion | |
| dotnet restore "Source/Krypton Components/Krypton.Utilities/Krypton.Utilities.csproj" | |
| $nugetBasePath = "$env:USERPROFILE\.nuget\packages\microsoft.web.webview2\$latestVersion" | |
| $coreDll = Get-ChildItem -Path $nugetBasePath -Recurse -Name "Microsoft.Web.WebView2.Core.dll" | Select-Object -First 1 | |
| Copy-Item (Join-Path $nugetBasePath $coreDll) "WebView2SDK\" | |
| $winFormsDll = Get-ChildItem -Path $nugetBasePath -Recurse -Name "Microsoft.Web.WebView2.WinForms.dll" | Select-Object -First 1 | |
| Copy-Item (Join-Path $nugetBasePath $winFormsDll) "WebView2SDK\" | |
| $loaderDll = Get-ChildItem -Path $nugetBasePath -Recurse -Name "WebView2Loader.dll" | Select-Object -First 1 | |
| Copy-Item (Join-Path $nugetBasePath $loaderDll) "WebView2SDK\" | |
| dotnet remove "Source/Krypton Components/Krypton.Utilities/Krypton.Utilities.csproj" package Microsoft.Web.WebView2 | |
| - name: Restore | |
| run: dotnet restore "Source/Krypton Components/Krypton Toolkit Suite 2022 - VS2022.slnx" | |
| - name: Build Release | |
| run: msbuild "Scripts/Build/build.proj" /t:Build /p:Configuration=Release /p:Platform="Any CPU" | |
| - name: Pack Release | |
| run: msbuild "Scripts/Build/build.proj" /t:Pack /p:Configuration=Release /p:Platform="Any CPU" | |
| - name: Get Version | |
| id: get_version | |
| run: | | |
| $version = (dotnet build "Source/Krypton Components/Krypton.Toolkit/Krypton.Toolkit.csproj" --no-restore --verbosity quiet | Select-String "Version" | ForEach-Object { $_.Line.Split('=')[1].Trim() }) | |
| if (-not $version) { | |
| $version = "100.25.1.1" # Fallback version | |
| } | |
| echo "version=$version" >> $env:GITHUB_OUTPUT | |
| echo "tag=v$version" >> $env:GITHUB_OUTPUT |