Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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"
96 changes: 96 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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.<run number>, 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}
6 changes: 3 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.<yyMM>.<run number>`, 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` (`<Version>`); CI overrides via `/p:Version=`.

## Git
Expand Down
2 changes: 1 addition & 1 deletion DSoft.WizardControl.WPF/DSoft.WizardControl.WPF.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net10.0-windows7.0;net10.0-windows10.0.18362;</TargetFrameworks>
<TargetFrameworks>net10.0-windows7.0;net10.0-windows10.0.18362;net11.0-windows7.0;net11.0-windows10.0.18362</TargetFrameworks>
<RootNamespace>DSoft.WizardControl</RootNamespace>
<AssemblyName>DSoft.WizardControl.WPF</AssemblyName>
<Product>$(AssemblyName) ($(TargetFramework))</Product>
Expand Down
2 changes: 1 addition & 1 deletion DSoft.WizardControl.WinUI/DSoft.WizardControl.WinUI.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net10.0-windows10.0.19041.0;</TargetFrameworks>
<TargetFrameworks>net10.0-windows10.0.19041.0;net11.0-windows10.0.19041.0</TargetFrameworks>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
<UseWinUI>true</UseWinUI>
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</PropertyGroup>

<ItemGroup Condition=" '$(Configuration)'=='Release'">
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="11.0.100" PrivateAssets="All" />
</ItemGroup>

<PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
Expand Down
2 changes: 0 additions & 2 deletions Dsoft.WizardControl.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
<Platform Name="x86" />
</Configurations>
<Folder Name="/.ci/">
<File Path="azure-pipelines-mergetest.yml" />
<File Path="azure-pipelines-release.yml" />
<File Path="Directory.Build.props" />
<File Path="README.md" />
</Folder>
Expand Down
2 changes: 1 addition & 1 deletion WinUISample/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public MainPage()

private void OnCloseWindowRequest(object? sender, bool e)
{

Application.Current.Exit();
}
}
}
5 changes: 3 additions & 2 deletions WinUISample/WinUISample.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net10.0-windows10.0.19041.0</TargetFramework>
<TargetFrameworks>net10.0-windows10.0.19041.0;net11.0-windows10.0.19041.0</TargetFrameworks>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<RootNamespace>WinUISample</RootNamespace>
<ApplicationManifest>app.manifest</ApplicationManifest>
Expand All @@ -10,6 +10,7 @@
<PublishProfile>win-$(Platform).pubxml</PublishProfile>
<UseWinUI>true</UseWinUI>
<EnableMsixTooling>true</EnableMsixTooling>
<WindowsPackageType>None</WindowsPackageType>
<SignAssembly>false</SignAssembly>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
Expand All @@ -35,7 +36,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="DSoft.System.Mvvm" Version="3.6.2606.131" />
<PackageReference Include="DSoft.System.Mvvm" Version="3.6.2611.2" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.28000.1839" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="2.2.0" />
<Manifest Include="$(ApplicationManifest)" />
Expand Down
4 changes: 2 additions & 2 deletions WpfAppNetCore/WpfAppNetCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net10.0-Windows7.0</TargetFramework>
<TargetFrameworks>net10.0-windows7.0;net11.0-windows7.0</TargetFrameworks>
<UseWPF>true</UseWPF>
<SignAssembly>false</SignAssembly>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="DSoft.System.Mvvm" Version="3.6.2606.131" />
<PackageReference Include="DSoft.System.Mvvm" Version="3.6.2611.2" />
<PackageReference Include="MahApps.Metro" Version="2.4.11" />
</ItemGroup>

Expand Down
43 changes: 0 additions & 43 deletions azure-pipelines-mergetest.yml

This file was deleted.

67 changes: 0 additions & 67 deletions azure-pipelines-release.yml

This file was deleted.