From 11239d01cbe1052ffdafb52434ac48684d051b44 Mon Sep 17 00:00:00 2001 From: Yidi Mao Date: Fri, 16 Oct 2026 06:07:55 +0300 Subject: [PATCH] ci: use an absolute bundle output dir so the release finds the bundle MSBuild resolves a relative -p:AppxPackageDir against the project folder, so the v0.1.4 tag build wrote UnityExtension/UnityExtension/BundleArtifacts while the 'Find MSIX bundle' step searched UnityExtension/BundleArtifacts and failed. Make PACKAGE_DIR absolute in release-msix.yml and pass the same override in the PR bundle-build job so this path logic is exercised before a tag. --- .github/workflows/ci.yml | 6 +++--- .github/workflows/release-msix.yml | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3a27dad..6382d7b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,13 +73,13 @@ jobs: run: dotnet restore UnityExtension/UnityExtension.csproj - name: Build MSIX bundle (unsigned) - run: dotnet build UnityExtension/UnityExtension.csproj --no-restore -c Release -p:Platform=x64 -p:GenerateAppxPackageOnBuild=true -p:AppxBundle=Always -p:AppxBundlePlatforms="x64|arm64" -p:AppxPackageSigningEnabled=false -p:SuppressSdkNoise=false + run: dotnet build UnityExtension/UnityExtension.csproj --no-restore -c Release -p:Platform=x64 -p:GenerateAppxPackageOnBuild=true -p:AppxBundle=Always -p:AppxBundlePlatforms="x64|arm64" -p:AppxPackageDir=${{ github.workspace }}\UnityExtension\BundleArtifacts\ -p:AppxPackageSigningEnabled=false -p:SuppressSdkNoise=false - name: Check bundle exists shell: pwsh run: | - $bundle = Get-ChildItem -Path AppPackages -Recurse -Filter *.msixbundle | Select-Object -First 1 - if (-not $bundle) { throw 'No .msixbundle produced under AppPackages' } + $bundle = Get-ChildItem -Path UnityExtension\BundleArtifacts -Recurse -Filter *.msixbundle | Select-Object -First 1 + if (-not $bundle) { throw 'No .msixbundle produced under UnityExtension\BundleArtifacts' } Write-Host "Built $($bundle.Name) ($([math]::Round($bundle.Length / 1MB, 1)) MB)" validate-version: diff --git a/.github/workflows/release-msix.yml b/.github/workflows/release-msix.yml index afb3a1e..55c1a49 100644 --- a/.github/workflows/release-msix.yml +++ b/.github/workflows/release-msix.yml @@ -23,7 +23,8 @@ jobs: env: PROJECT_PATH: UnityExtension\UnityExtension.csproj - PACKAGE_DIR: UnityExtension\BundleArtifacts + # Absolute: MSBuild resolves a relative AppxPackageDir against the project folder, not the repo root. + PACKAGE_DIR: ${{ github.workspace }}\UnityExtension\BundleArtifacts DOTNET_VERSION: 10.0.x steps: