Moved the NuGet.config file to the root snippets folder. Removed the … #19
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
| name: Build WPF Solutions | |
| on: | |
| push: | |
| paths: | |
| - 'snippets/**' | |
| pull_request: | |
| paths: | |
| - 'snippets/**' | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET 10 | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Add Telerik NuGet source | |
| shell: pwsh | |
| run: | | |
| dotnet nuget add source "https://nuget.telerik.com/v3/index.json" --name "Telerik NuGet Server" --username "api-key" --password $env:TELERIK_API_KEY --store-password-in-clear-text | |
| env: | |
| TELERIK_API_KEY: ${{ secrets.TELERIK_API_KEY }} | |
| - name: Debug Telerik NuGet | |
| shell: pwsh | |
| run: | | |
| Write-Host "TELERIK_API_KEY length: $($env:TELERIK_API_KEY.Length)" | |
| dotnet nuget list source | |
| - name: Restore & Build all solutions | |
| shell: pwsh | |
| run: | | |
| # Find both .sln and .slnx files | |
| $solutions = Get-ChildItem "./snippets" -Recurse -Include *.sln,*.slnx -File | |
| if (-not $solutions) { | |
| Write-Error "No solution files (.sln or .slnx) found!" | |
| exit 1 | |
| } | |
| foreach ($sln in $solutions) { | |
| Write-Host "" | |
| Write-Host "==============================" | |
| Write-Host "Building $($sln.FullName)" | |
| Write-Host "==============================" | |
| dotnet restore "$($sln.FullName)" | |
| if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | |
| dotnet build "$($sln.FullName)" ` | |
| --configuration Release ` | |
| --no-restore | |
| if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | |
| } |