From a4eb3d6f8a1b8045e3740b8f5b637ca6eae8c42f Mon Sep 17 00:00:00 2001 From: wangdage12 <124357765+wangdage12@users.noreply.github.com> Date: Wed, 26 Nov 2025 19:25:43 +0800 Subject: [PATCH] Add GitHub Actions workflow for MSI build --- .github/workflows/msi-build.yml | 41 +++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/msi-build.yml diff --git a/.github/workflows/msi-build.yml b/.github/workflows/msi-build.yml new file mode 100644 index 0000000..1e8a089 --- /dev/null +++ b/.github/workflows/msi-build.yml @@ -0,0 +1,41 @@ +name: Build MSI Installer + +on: + push: + branches: [ main ] + pull_request: + +jobs: + build: + runs-on: windows-latest + + steps: + - name: Checkout source + uses: actions/checkout@v4 + + - name: Setup .NET SDK + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 10.0.x + + - name: Install Wix Toolset 4 + run: dotnet tool install --global WixToolset.Wix --version 4.0.1 + + - name: Restore NuGet packages + run: dotnet restore + + - name: Build WinUI 3 project (self-contained) + run: dotnet publish src/Snap.Hutao/Snap.Hutao.csproj ` + -c Release ` + -r win-x64 ` + --self-contained true + + - name: Build MSI installer + run: dotnet build src/Snap.Hutao/Snap.Hutao.Installer/Snap.Hutao.Installer.wixproj -c Release + + - name: Upload MSI Artifact + uses: actions/upload-artifact@v4 + with: + name: Snap.Hutao-MSI + path: | + src/Snap.Hutao.Installer/bin/Release/*.msi