[release/v7.4.15] Create infrastructure to create two msixs and msixbundles for LTS and Stable#27145
Conversation
There was a problem hiding this comment.
Pull request overview
Backport to release/v7.4.15 that updates Windows packaging/pipeline infrastructure to build and handle both LTS and Stable MSIX/MSIXBundle artifacts in the same run, and to publish the correct bundle for store submissions based on channel selection.
Changes:
- Update MSIX packaging naming logic so LTS and Stable MSIX outputs can coexist and be distinguished reliably.
- Build an additional Stable MSIX when both LTS and Stable packaging are requested.
- Create and publish separate MSIX bundles (LTS vs Stable/Preview), then select the correct bundle for StoreBroker packaging based on channel.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
tools/packaging/packaging.psm1 |
Adjusts MSIX package name construction to better support parallel LTS + Stable outputs. |
.pipelines/templates/packaging/windows/package.yml |
Builds an additional Stable MSIX when LTS packaging is enabled alongside Stable packaging. |
.pipelines/templates/package-create-msix.yml |
Splits MSIX inputs into LTS vs non-LTS groups, creates two bundles, uploads both, and selects the correct one for store packaging. |
|
|
||
| $packageName = $ProductName + '-' + $ProductSemanticVersion | ||
|
|
||
| # Appends Architecture to the package name |
There was a problem hiding this comment.
The comment says the package name suffix appends architecture, but the code appends ProductNameSuffix (which may or may not be architecture). Consider updating the comment to reflect what’s actually appended (e.g., the RID/name suffix like win-x64).
| # Appends Architecture to the package name | |
| # Append the product name suffix (e.g., RID/architecture suffix like win-x64) to the package name |
| $prefix = ($file.BaseName -split "-win")[0] | ||
| $stableBundleName = "$prefix.msixbundle" | ||
| Write-Verbose -Verbose "Creating Stable/Preview bundle: $stableBundleName" | ||
| & $makeappx bundle /d $stableDir /p "$outputDir\$stableBundleName" | ||
| } |
There was a problem hiding this comment.
makeappx bundle is executed via the call operator, which won’t fail the step on non-zero exit codes by default. Wrap this native call with Start-NativeExecution (or check $LASTEXITCODE and throw) so bundling failures reliably fail the pipeline with useful diagnostics.
| $prefix = ($file.BaseName -split "-win")[0] | ||
| $ltsBundleName = "$prefix.msixbundle" | ||
| Write-Verbose -Verbose "Creating LTS bundle: $ltsBundleName" | ||
| & $makeappx bundle /d $ltsDir /p "$outputDir\$ltsBundleName" | ||
| } |
There was a problem hiding this comment.
Same as above: this makeappx bundle invocation should use Start-NativeExecution (or explicit exit-code handling) to ensure failures stop the job instead of silently continuing.
| # Separate LTS and Stable/Preview MSIX files by filename convention | ||
| $ltsMsix = @(Get-ChildItem $sourceDir -Filter '*.msix' | Where-Object { $_.BaseName -match '-LTS-' }) | ||
| $stableMsix = @(Get-ChildItem $sourceDir -Filter '*.msix' | Where-Object { $_.BaseName -notmatch '-LTS-' }) | ||
|
|
||
| Write-Verbose -Verbose "Stable/Preview MSIX files: $($stableMsix.Name -join ', ')" |
There was a problem hiding this comment.
This step adds more non-trivial PowerShell logic directly in YAML (file discovery + bundle creation). Consider moving this logic into a reusable PowerShell function (e.g., in tools/ci.psm1 / packaging module) and calling it from YAML to keep the pipeline template easier to maintain and test.
Backport of #27056 to release/v7.4.15
Triggered by @adityapatwardhan on behalf of @jshigetomi
Original CL Label: CL-BuildPackaging
/cc @PowerShell/powershell-maintainers
Impact
REQUIRED: Choose either Tooling Impact or Customer Impact (or both). At least one checkbox must be selected.
Tooling Impact
Required packaging and pipeline infrastructure update so release/v7.4.15 can build and publish both LTS and Stable MSIX/MSIXBundle artifacts with correct channel selection.
Customer Impact
Regression
REQUIRED: Check exactly one box.
This is not a regression.
Testing
Cherry-pick applied cleanly to release/v7.4.15 with no merge conflicts. The change is already merged and validated on main and has existing successful backport activity for release/v7.6.
Risk
REQUIRED: Check exactly one box.
Touches packaging/pipeline logic, but changes are scoped and directly align release behavior with already-merged upstream logic for artifact handling.