Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot 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 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 finished work on behalf of TravisEz13 October 16, 2025 22:37
@Copilot 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.

Copilot finished work on behalf of TravisEz13 October 16, 2025 22:51
@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.

@Copilot Copilot AI requested a review from TravisEz13 October 16, 2025 23:05
Copilot finished work on behalf of TravisEz13 October 16, 2025 23:05
@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 Copilot AI changed the title Convert Windows packaging Azure DevOps pipeline to GitHub workflow Integrate Windows packaging into windows-ci workflow Oct 16, 2025
Copilot finished work on behalf of TravisEz13 October 16, 2025 23:28
@TravisEz13 TravisEz13 added the CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log label Oct 16, 2025
@TravisEz13 TravisEz13 marked this pull request as ready for review October 16, 2025 23:56
@TravisEz13 TravisEz13 requested review from a team and jshigetomi as code owners October 16, 2025 23:56
@TravisEz13
Copy link
Member

@copilot refactor the packaging job into a reusable workflow that is called from the current location

Copy link
Contributor Author

Copilot AI commented Oct 17, 2025

@copilot refactor the packaging job into a reusable workflow that is called from the current location

Refactored in commit above. Created a reusable workflow (windows-packaging-reusable.yml) that accepts architecture, channel, and runtimePrefix as inputs. The windows-ci.yml now calls this reusable workflow four times with different configurations instead of using a matrix job.

@Copilot Copilot AI changed the title Integrate Windows packaging into windows-ci workflow Integrate Windows packaging into windows-ci workflow using reusable workflow Oct 17, 2025
@Copilot Copilot AI requested a review from TravisEz13 October 17, 2025 00:19
Copilot finished work on behalf of TravisEz13 October 17, 2025 00:19
@TravisEz13
Copy link
Member

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

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.

Copilot finished work on behalf of TravisEz13 October 17, 2025 00:23
@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

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
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BackPort-7.4.x-Consider BackPort-7.5.x-Consider 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