[release/v7.6] Add log grouping to build.psm1 for collapsible GitHub Actions logs #26524
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport of #26326 to release/v7.6
Triggered by @TravisEz13 on behalf of @app/copilot-swe-agent
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
Improves readability of GitHub Actions logs by creating collapsible sections. Makes it easier to navigate verbose build output.
Customer Impact
Regression
REQUIRED: Check exactly one box.
This is not a regression.
Testing
Verified that log grouping functions (Write-LogGroupStart/Write-LogGroupEnd) work correctly in GitHub Actions workflows. Tested collapsible log sections render properly in the Actions UI. Backport tested by reviewing conflict resolution in build.psm1 to ensure v7.6 code patterns are preserved while adding log grouping.
Risk
REQUIRED: Check exactly one box.
This change only adds logging wrapper functions that create collapsible sections in GitHub Actions. The core build logic remains unchanged. Merge conflicts were minimal and only involved preserving v7.6's Scenario validation values while adding the log grouping calls.
Merge Conflicts
Conflict in build.psm1: v7.6 uses different Scenario parameter values ('Package', 'DotNet', 'Both') compared to main branch which added 'Tools' and 'All'. Resolution: Kept v7.6's existing values and added log grouping calls without changing the Scenario logic.