From 94190aad6e5b151d671ef5c5b409c5357c7dc982 Mon Sep 17 00:00:00 2001 From: David Humphreys Date: Mon, 16 Nov 2026 20:46:23 +0000 Subject: [PATCH 1/4] Add net11.0 targets alongside net10.0 and GitHub Actions workflows --- .github/workflows/ci.yml | 32 +++++++ .github/workflows/release.yml | 96 +++++++++++++++++++ CLAUDE.md | 6 +- .../DSoft.WizardControl.WPF.csproj | 2 +- .../DSoft.WizardControl.WinUI.csproj | 2 +- Directory.Build.props | 2 +- WinUISample/WinUISample.csproj | 4 +- WpfAppNetCore/WpfAppNetCore.csproj | 4 +- 8 files changed, 138 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..85fc45c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,32 @@ +# Pull request validation: builds Release (WPF and WinUI need Windows). Publishes nothing. +name: CI + +on: + pull_request: + branches: [master, dev] + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + runs-on: windows-latest + steps: + - uses: actions/checkout@v7 + + - uses: actions/setup-dotnet@v6 + with: + dotnet-version: | + 10.x + 11.x + + - name: Restore + run: dotnet restore Dsoft.WizardControl.slnx + + - name: Build + run: dotnet build Dsoft.WizardControl.slnx --configuration Release --no-restore /p:Platform="Any CPU" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..e7f4228 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,96 @@ +# Release: on every push to master, builds Release and pushes the +# DSoft.WizardControl.* packages to nuget.org as 3.1.yyMM., then tags the +# commit and creates a GitHub release with the packages attached. +# RELEASE_SUFFIX is empty for a stable version; set it to a suffix such as +# '-prerelease' to publish a prerelease. +# Signs in to nuget.org with Trusted Publishing (OIDC), so no API key is stored. +name: Release + +on: + push: + branches: [master] + paths-ignore: + - '**.md' + - '.github/workflows/**' + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: release + cancel-in-progress: false + +env: + RELEASE_SUFFIX: '' + +jobs: + release: + runs-on: windows-latest + environment: nuget + permissions: + contents: write # GitHub release and tag + id-token: write # Trusted Publishing + steps: + - uses: actions/checkout@v7 + + - uses: actions/setup-dotnet@v6 + with: + dotnet-version: | + 10.x + 11.x + + - name: Version + id: version + shell: bash + run: | + version="3.1.$(date -u +%y%m).${{ github.run_number }}" + echo "version=$version" >> "$GITHUB_OUTPUT" + echo "package=$version$RELEASE_SUFFIX" >> "$GITHUB_OUTPUT" + echo "Version: $version$RELEASE_SUFFIX" + + - name: Restore + run: dotnet restore Dsoft.WizardControl.slnx + + - name: Build + run: > + dotnet build Dsoft.WizardControl.slnx --configuration Release --no-restore /p:Platform="Any CPU" + /p:Version=${{ steps.version.outputs.package }} + /p:AssemblyVersion=${{ steps.version.outputs.version }} + /p:FileVersion=${{ steps.version.outputs.version }} + + - name: Collect packages + shell: bash + run: | + mkdir -p artifacts + find . -path '*/bin/Release/*' -name 'DSoft.*.nupkg' -exec cp {} artifacts/ \; + ls artifacts + + - uses: actions/upload-artifact@v7 + with: + name: drop + path: artifacts/*.nupkg + + - name: NuGet login + id: nuget + uses: NuGet/login@v1 + with: + user: ${{ secrets.NUGET_USER }} + + - name: Push to nuget.org + shell: bash + run: | + for package in artifacts/*.nupkg; do + dotnet nuget push "$package" --api-key "${{ steps.nuget.outputs.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate + done + + - name: GitHub release + shell: bash + env: + GH_TOKEN: ${{ github.token }} + run: | + gh release create "v${{ steps.version.outputs.package }}" artifacts/*.nupkg \ + --target "${{ github.sha }}" \ + --title "${{ steps.version.outputs.package }}" \ + --generate-notes \ + ${RELEASE_SUFFIX:+--prerelease} diff --git a/CLAUDE.md b/CLAUDE.md index 3d261dc..5db94e2 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -11,8 +11,8 @@ A reusable wizard control distributed as NuGet packages for two XAML UI stacks: Use `Dsoft.WizardControl.slnx` (new XML solution format) — it is the current solution. `Dsoft.WizardControl.sln` is the legacy MSBuild solution. The `slnx` contains: - `DSoft.WizardControl.Core` — interfaces, enums, event args, page configuration. No UI dependency. -- `DSoft.WizardControl.WPF` — WPF NuGet package (targets net10 `-windows7.0` and `-windows10.0.18362`). -- `DSoft.WizardControl.WinUI` — WinUI 3 NuGet package (targets net10 `-windows10.0.19041.0`). +- `DSoft.WizardControl.WPF` — WPF NuGet package (targets net10.0 and net11.0, each with `-windows7.0` and `-windows10.0.18362`). +- `DSoft.WizardControl.WinUI` — WinUI 3 NuGet package (targets net10.0 and net11.0 with `-windows10.0.19041.0`). - `WpfAppNetCore`, `WinUISample` — runnable sample apps under the `Samples/` folder. `Dsoft.WizardControl/Dsoft.WizardControl.WPFOld.csproj` is a legacy .NET Framework 4.6.1 project, **not** part of `slnx`. Do not modify it for new work. @@ -60,7 +60,7 @@ Applies to all projects: documentation XML generation, `GeneratePackageOnBuild`, ## Versioning & CI -- Azure Pipelines (`azure-pipelines-release.yml`) builds `master` on `windows-latest` with the .NET 10 SDK, stamps version from build number (`3.0.$(date...)`), and publishes `DSoft.*.nupkg` artifacts. `azure-pipelines-mergetest.yml` validates merges. +- GitHub Actions (`.github/workflows/`) on `windows-latest` with the .NET 10 and .NET 11 SDKs. `ci.yml` builds Release for pull requests into `master` and `dev` and publishes nothing. `release.yml` runs on every push to `master`, builds Release as `3.1..`, pushes the `DSoft.*` packages to nuget.org with Trusted Publishing (OIDC, `NUGET_USER` secret, `nuget` environment), then tags the commit and creates a GitHub release. - Package versions are set per-project in the `.csproj` (``); CI overrides via `/p:Version=`. ## Git diff --git a/DSoft.WizardControl.WPF/DSoft.WizardControl.WPF.csproj b/DSoft.WizardControl.WPF/DSoft.WizardControl.WPF.csproj index 29ce5d5..2326f1b 100644 --- a/DSoft.WizardControl.WPF/DSoft.WizardControl.WPF.csproj +++ b/DSoft.WizardControl.WPF/DSoft.WizardControl.WPF.csproj @@ -1,7 +1,7 @@  - net10.0-windows7.0;net10.0-windows10.0.18362; + net10.0-windows7.0;net10.0-windows10.0.18362;net11.0-windows7.0;net11.0-windows10.0.18362 DSoft.WizardControl DSoft.WizardControl.WPF $(AssemblyName) ($(TargetFramework)) diff --git a/DSoft.WizardControl.WinUI/DSoft.WizardControl.WinUI.csproj b/DSoft.WizardControl.WinUI/DSoft.WizardControl.WinUI.csproj index 2c30198..8efa927 100644 --- a/DSoft.WizardControl.WinUI/DSoft.WizardControl.WinUI.csproj +++ b/DSoft.WizardControl.WinUI/DSoft.WizardControl.WinUI.csproj @@ -1,7 +1,7 @@  - net10.0-windows10.0.19041.0; + net10.0-windows10.0.19041.0;net11.0-windows10.0.19041.0 10.0.17763.0 win-x86;win-x64;win-arm64 true diff --git a/Directory.Build.props b/Directory.Build.props index a111a94..5a12d61 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -38,7 +38,7 @@ - + diff --git a/WinUISample/WinUISample.csproj b/WinUISample/WinUISample.csproj index a04efd9..6c9971c 100644 --- a/WinUISample/WinUISample.csproj +++ b/WinUISample/WinUISample.csproj @@ -1,7 +1,7 @@  WinExe - net10.0-windows10.0.19041.0 + net10.0-windows10.0.19041.0;net11.0-windows10.0.19041.0 10.0.17763.0 WinUISample app.manifest @@ -35,7 +35,7 @@ - + diff --git a/WpfAppNetCore/WpfAppNetCore.csproj b/WpfAppNetCore/WpfAppNetCore.csproj index 629a2d3..d71db70 100644 --- a/WpfAppNetCore/WpfAppNetCore.csproj +++ b/WpfAppNetCore/WpfAppNetCore.csproj @@ -2,7 +2,7 @@ WinExe - net10.0-Windows7.0 + net10.0-windows7.0;net11.0-windows7.0 true false false @@ -10,7 +10,7 @@ - + From 17b33a0327b12a89556896217d0e69689d2bd72b Mon Sep 17 00:00:00 2001 From: David Humphreys Date: Mon, 16 Nov 2026 21:37:44 +0000 Subject: [PATCH 2/4] Bump WinUISample Microsoft.WindowsAppSDK to 2.6.5 --- WinUISample/WinUISample.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WinUISample/WinUISample.csproj b/WinUISample/WinUISample.csproj index 6c9971c..1b957df 100644 --- a/WinUISample/WinUISample.csproj +++ b/WinUISample/WinUISample.csproj @@ -37,7 +37,7 @@ - + From c4d8222c654987bfbe0835d22e0181dc96e6efd6 Mon Sep 17 00:00:00 2001 From: David Humphreys Date: Mon, 16 Nov 2026 21:50:55 +0000 Subject: [PATCH 3/4] Revert "Bump WinUISample Microsoft.WindowsAppSDK to 2.6.5" This reverts commit 17b33a0327b12a89556896217d0e69689d2bd72b. --- WinUISample/WinUISample.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WinUISample/WinUISample.csproj b/WinUISample/WinUISample.csproj index 1b957df..6c9971c 100644 --- a/WinUISample/WinUISample.csproj +++ b/WinUISample/WinUISample.csproj @@ -37,7 +37,7 @@ - + From 466e07ba0af629b00b490fde1051f2ea45efaaa4 Mon Sep 17 00:00:00 2001 From: David Humphreys Date: Mon, 16 Nov 2026 21:51:02 +0000 Subject: [PATCH 4/4] WinUISample: run unpackaged and close the window on Finish and Cancel --- WinUISample/MainPage.xaml.cs | 2 +- WinUISample/WinUISample.csproj | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/WinUISample/MainPage.xaml.cs b/WinUISample/MainPage.xaml.cs index 5b2710a..8e52457 100644 --- a/WinUISample/MainPage.xaml.cs +++ b/WinUISample/MainPage.xaml.cs @@ -41,7 +41,7 @@ public MainPage() private void OnCloseWindowRequest(object? sender, bool e) { - + Application.Current.Exit(); } } } diff --git a/WinUISample/WinUISample.csproj b/WinUISample/WinUISample.csproj index 6c9971c..86642b7 100644 --- a/WinUISample/WinUISample.csproj +++ b/WinUISample/WinUISample.csproj @@ -10,6 +10,7 @@ win-$(Platform).pubxml true true + None false false false