[release/v7.4] Correct the package name for .deb and .rpm packages (#26877)#26960
Conversation
…owerShell#26877) (PowerShell#26954) Co-authored-by: Dongbo Wang <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: Travis Plunk <[email protected]>
There was a problem hiding this comment.
Pull request overview
This PR is a backport to the release/v7.4 branch that corrects package naming for .deb and .rpm packages. Previously, preview versions of PowerShell were not receiving the powershell-preview package name for Linux packages (deb/rpm), which caused a mismatch with existing package names on packages.microsoft.com. The fix adds Test-IsPreview detection and uses powershell-preview as the package name for preview deb/rpm builds, while preserving the existing behavior for macOS (osxpkg) packages. Additionally, the macOS CI workflow's packaging job condition is narrowed to only trigger on packaging-related changes.
Changes:
- Added
$IsPreviewdetection viaTest-IsPreviewandpowershell-previewnaming for deb/rpm packages inNew-UnixPackage - Changed macOS packaging CI job trigger from source/build changes to packaging-specific changes (
packagingChanged) - Added
packagingChangedoutput to the macOS CI workflow's change detection job
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tools/packaging/packaging.psm1 | Adds Test-IsPreview call and powershell-preview name for preview deb/rpm packages, excluding osxpkg |
| .github/workflows/macos-ci.yml | Adds packagingChanged output and switches packaging job condition to use it |
| needs: | ||
| - changes | ||
| if: ${{ needs.changes.outputs.source == 'true' || needs.changes.outputs.buildModuleChanged == 'true' }} | ||
| if: ${{ needs.changes.outputs.packagingChanged == 'true' }} |
There was a problem hiding this comment.
The packagingChanged output is not set in the path-filters action for non-PR events (push to master, release/**, etc.). On push events, the action only sets toolsChanged, githubChanged, propsChanged, testsChanged, mainSourceChanged, buildModuleChanged, and source — but NOT packagingChanged (see .github/actions/infrastructure/path-filters/action.yml lines 50-61). This means the macOS packaging job will never run on push events.
Previously, this job used source == 'true' || buildModuleChanged == 'true', which worked on push events since both source and buildModuleChanged are set to true for non-PR events.
Note: This same issue already affects linux_packaging in linux-ci.yml and windows_packaging in windows-ci.yml which also use packagingChanged. This should be fixed in the default branch first by adding packagingChanged to the non-PR outputs in the path-filters action.
Suggested Issue for Default Branch:
Issue Title
path-filters action does not set packagingChanged output for non-PR (push) events
Description
The path-filters composite action at .github/actions/infrastructure/path-filters/action.yml has a fast path for non-PR events (lines 50-61) that sets all outputs to true, but packagingChanged is missing from this block.
Current State:
- On push events,
packagingChangedis never set (empty/falsy) - All packaging jobs in linux-ci.yml, windows-ci.yml, and macos-ci.yml depend on
packagingChanged == 'true' - Packaging jobs will never run on push events to
masterorrelease/**branches
Expected State:
Add core.setOutput('packagingChanged', true); to the non-PR block alongside the other outputs.
Files Affected:
.github/actions/infrastructure/path-filters/action.yml
Priority: High
Labels: Issue-Bug, Area-Build
Backport #26954