Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 16, 2025

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 changed the title [WIP] Convert Azure DevOps pipeline to GitHub workflow Convert Windows packaging Azure DevOps pipeline to GitHub workflow Oct 16, 2025
Copilot AI requested a review from TravisEz13 October 16, 2025 22:37
@TravisEz13

This comment was marked as outdated.

This comment was marked as outdated.

@TravisEz13
Copy link
Member

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

Copy link
Contributor Author

Copilot AI commented Oct 16, 2025

@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
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/*

Copy link
Contributor Author

Copilot AI commented Oct 16, 2025

@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
Copy link
Contributor Author

Copilot AI commented Oct 17, 2025

@copilot put packaging in a single reusable workflow with the entire matrix

Done in commit above. The reusable workflow now contains the entire matrix with all four configurations, and windows-ci.yml calls it once. This groups all packaging jobs together under "Windows Packaging" in the GitHub Actions UI.

@TravisEz13 TravisEz13 marked this pull request as draft October 17, 2025 00:24
@TravisEz13
Copy link
Member

/azp run PowerShell-CI-linux-packaging, PowerShell-Windows-Packaging-CI

@azure-pipelines
Copy link

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@TravisEz13 TravisEz13 marked this pull request as ready for review October 17, 2025 16:57
@TravisEz13 TravisEz13 merged commit 0d5d7de into master Oct 17, 2025
38 checks passed
@microsoft-github-policy-service
Copy link
Contributor

microsoft-github-policy-service bot commented Oct 17, 2025

📣 Hey @@Copilot, how did we do? We would love to hear your feedback with the link below! 🗣️

🔗 https://aka.ms/PSRepoFeedback

@TravisEz13 TravisEz13 deleted the copilot/convert-azdo-pipeline-to-github-workflow branch October 18, 2025 17:52
pwshBot pushed a commit to pwshBot/PowerShell that referenced this pull request Oct 29, 2025
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] <[email protected]>
Co-authored-by: TravisEz13 <[email protected]>
Co-authored-by: Travis Plunk <[email protected]>
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] <[email protected]>
Co-authored-by: TravisEz13 <[email protected]>
Co-authored-by: Travis Plunk <[email protected]>
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] <[email protected]>
Co-authored-by: TravisEz13 <[email protected]>
Co-authored-by: Travis Plunk <[email protected]>
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] <[email protected]>
Co-authored-by: TravisEz13 <[email protected]>
Co-authored-by: Travis Plunk <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backport-7.4.x-Migrated Backport-7.5.x-Migrated Backport-7.6.x-Migrated 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.

3 participants