Integrate Windows packaging into windows-ci workflow using reusable workflow by Copilot · Pull Request #26224 · PowerShell/PowerShell · GitHub
Skip to content

Integrate Windows packaging into windows-ci workflow using reusable workflow - #26224

Merged
Travis Plunk (TravisEz13) merged 13 commits into
masterfrom
copilot/convert-azdo-pipeline-to-github-workflow
Oct 17, 2025
Merged

Travis Plunk (TravisEz13) merged 13 commits into
masterfrom
copilot/convert-azdo-pipeline-to-github-workflow

Conversation

Copilot AI commented Oct 16, 2025 •

Copy link
Copy Markdown
Contributor

Converts the Windows packaging Azure DevOps pipeline to GitHub Actions and integrates it into the existing windows-ci.yml workflow for better maintainability and efficiency.

Changes Made

Workflow Integration

  • Created reusable workflow (windows-packaging-reusable.yml) for Windows packaging with an internal matrix strategy
  • Single workflow call from windows-ci.yml that groups all packaging configurations together in the GitHub Actions UI
  • Added path-filters support for packaging-related file changes with a new packagingChanged output
  • Matrix strategy with four configurations inside the reusable workflow:
    • x64 preview (win7-x64)
    • x86 stable (win7-x86)
    • x86 preview (win7-x86)
    • arm64 preview (win-arm64)

Path Filtering

Updated the path-filters composite action to detect changes to packaging-related files:

  • .github/workflows/windows-ci.yml
  • assets/wix/**
  • build.psm1
  • global.json
  • nuget.config
  • PowerShell.Common.props
  • src/*.csproj
  • test/packaging/windows/**
  • tools/ci.psm1
  • tools/packaging/**
  • tools/wix/**

The packagingChanged logic was refactored to use already-computed boolean variables (buildModuleChanged, globalConfigChanged, toolsCiPsm1Changed) for better code organization and efficiency.

Build Pipeline

The reusable packaging workflow follows the same pattern as other windows-ci jobs:

  1. Deep git checkout (fetch-depth: 1000) for git history and tags
  2. Environment and PowerShell version capture
  3. Switch to public NuGet feeds
  4. .NET SDK setup using global.json
  5. Bootstrap via Invoke-CIInstall
  6. Build and package via Invoke-CIFinish (runs both Build and Package stages together)
  7. Upload artifacts for each matrix configuration

Environment Configuration

  • Added SYSTEM_ARTIFACTSDIRECTORY and BUILD_ARTIFACTSTAGINGDIRECTORY environment variables to support the packaging process
  • SBOM generation handled automatically via packaging.psm1 when running outside Azure DevOps

UI Organization

The packaging jobs only run when packaging-related files are changed, optimizing CI resources while maintaining full functionality. All four packaging configurations appear grouped together under a single "Windows Packaging" job in the GitHub Actions UI, providing a cleaner and more organized view where users can expand/collapse the packaging group to see all matrix jobs.

Original prompt

Convert this AzDO pipeline to a GitHub Workflow


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits October 16, 2025 22:30
Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>
… conversion

Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>
Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>
Copilot AI changed the title [WIP] Convert Azure DevOps pipeline to GitHub workflow Convert Windows packaging Azure DevOps pipeline to GitHub workflow Oct 16, 2025
@TravisEz13

This comment was marked as outdated.

Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>

This comment was marked as outdated.

Comment thread .github/workflows/windows-packaging.yml Outdated
@TravisEz13

Copy link
Copy Markdown
Member

Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>

Copilot AI commented Oct 16, 2025

Copy link
Copy Markdown
Contributor Author

Copilot The Build and Package step requires a deep git checkout not shallow

Fixed in commit above. Changed the checkout to use fetch-depth: 1000 to ensure git history and tags are available for the build and packaging process, following the same pattern used in other CI workflows.

@TravisEz13

Copy link
Copy Markdown
Member

Copilot

Okay, it's working. Integrate it into windows-ci workflow instead of having it's own workflow.

trigger based on this list, but you need to use the path-filters composite action

    - ".github/workflows/windows-packaging.yml"
    - assets/wix/*
    - build.psm1
    - global.json
    - nuget.config
    - PowerShell.Common.props
    - src/*.csproj
    - test/packaging/windows/*
    - tools/ci.psm1
    - tools/packaging/*
    - tools/wix/*

Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>

Copilot AI commented Oct 16, 2025

Copy link
Copy Markdown
Contributor Author

Copilot

Okay, it's working. Integrate it into windows-ci workflow instead of having it's own workflow.
...

Integrated in commit above. The packaging jobs are now part of windows-ci.yml and use the path-filters composite action with a new packagingChanged output that checks for changes to the specified files. The standalone windows-packaging.yml has been removed.

Copilot AI changed the title Convert Windows packaging Azure DevOps pipeline to GitHub workflow Integrate Windows packaging into windows-ci workflow Oct 16, 2025
Comment thread .github/actions/infrastructure/path-filters/action.yml Outdated
@TravisEz13
Travis Plunk (TravisEz13) marked this pull request as ready for review October 17, 2025 16:57
@TravisEz13
Travis Plunk (TravisEz13) merged commit 0d5d7de into master Oct 17, 2025
38 checks passed
@microsoft-github-policy-service

microsoft-github-policy-service Bot commented Oct 17, 2025 •

Copy link
Copy Markdown
Contributor

@TravisEz13
Travis Plunk (TravisEz13) deleted the copilot/convert-azdo-pipeline-to-github-workflow branch October 18, 2025 17:52
Travis Plunk (TravisEz13) added a commit to TravisEz13/PowerShell that referenced this pull request Nov 5, 2025
…orkflow (PowerShell#26224)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>
Co-authored-by: Travis Plunk <travis.plunk@microsoft.com>
Travis Plunk (TravisEz13) added a commit to TravisEz13/PowerShell that referenced this pull request Nov 17, 2025
…orkflow (PowerShell#26224)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>
Co-authored-by: Travis Plunk <travis.plunk@microsoft.com>
SIRMARGIN pushed a commit to SIRMARGIN/PowerShell that referenced this pull request Dec 12, 2025
…orkflow (PowerShell#26224)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>
Co-authored-by: Travis Plunk <travis.plunk@microsoft.com>
Ryan Yates (kilasuit) pushed a commit to kilasuit/PowerShell that referenced this pull request Jan 2, 2026
…orkflow (PowerShell#26224)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>
Co-authored-by: Travis Plunk <travis.plunk@microsoft.com>
Justin Grote (JustinGrote) pushed a commit to JustinGrote/PowerShell that referenced this pull request Jun 2, 2026
…orkflow (PowerShell#26224)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>
Co-authored-by: Travis Plunk <travis.plunk@microsoft.com>
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
…orkflow (PowerShell#26224)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>
Co-authored-by: Travis Plunk <travis.plunk@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backport-7.4.x-Done Backport-7.5.x-Done Backport-7.6.x-Done CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants