Skip to content

Fix release title to match tag name and improve build output#82

Merged
homotechsual merged 2 commits into
mainfrom
develop
Apr 30, 2026
Merged

Fix release title to match tag name and improve build output#82
homotechsual merged 2 commits into
mainfrom
develop

Conversation

@homotechsual

Copy link
Copy Markdown
Owner

This pull request focuses on improving the release packaging process to ensure the module output preserves its intended folder structure. It also adds automated test coverage to prevent regressions in the build output layout. Additionally, versioning and release metadata have been updated to reflect these changes.

Release Packaging Improvements

  • Updated the Build function in DevOps/Build/build.ps1 to copy each top-level source folder (Public, Private, Classes, Data) as a folder, preserving the module's layout in the release output.
  • Updated the GitHub Actions release workflow in .github/workflows/create-release.yml to always set the release title to the tag name when creating a release.

Test Coverage

  • Added a new test in Tests/HaloAPI.Meta.Tests.ps1 to verify that the packaged output retains the expected top-level directories, guarding against future regressions in build packaging.

Versioning and Metadata

  • Bumped the module version to 1.23.3 in HaloAPI.psd1 and updated the ReleaseNotes link accordingly. [1] [2]
  • Added a changelog entry for version 1.23.3 describing the packaging fix and new test coverage.

Copilot AI review requested due to automatic review settings April 30, 2026 18:58
@homotechsual homotechsual merged commit c6643bb into main Apr 30, 2026
7 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Improves release packaging to preserve the module’s top-level folder structure, aligns GitHub Release titles with tag names, and adds a regression test to validate build output layout.

Changes:

  • Update build packaging to copy top-level folders as folders (no flattening).
  • Force GitHub release title to match the tag name in the release workflow.
  • Add a Pester test to verify expected top-level directories exist in the packaged output; bump module version and changelog entry.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
DevOps/Build/build.ps1 Copies source directories into the module output preserving folder structure.
.github/workflows/create-release.yml Ensures gh release create sets the release title to the tag name.
Tests/HaloAPI.Meta.Tests.ps1 Adds a build output layout regression test around packaged folder structure.
HaloAPI.psd1 Bumps module version and updates ReleaseNotes URL.
CHANGELOG.md Adds a 1.23.3 entry describing the packaging/test changes.

Comment on lines +93 to +94
$Script:BuildScriptPath = Join-Path -Path $ModulePath -ChildPath 'DevOps\Build\build.ps1'
$Script:BuiltModulePath = Join-Path -Path $ModulePath -ChildPath 'Output\HaloAPI'

Copilot AI Apr 30, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using Windows-style backslashes inside -ChildPath makes these paths incorrect on non-Windows PowerShell (backslash is treated as a literal character, so the file/folder won’t be found). Use OS-agnostic path construction (e.g., Join-Path with multiple segments, [IO.Path]::Combine, or forward slashes) so the test passes on Linux/macOS runners.

Copilot uses AI. Check for mistakes.
Comment on lines +102 to +106
$expectedDirectories = @('Public', 'Private', 'Classes', 'Data')
foreach ($expectedDirectory in $expectedDirectories) {
$expectedPath = Join-Path -Path $Script:BuiltModulePath -ChildPath $expectedDirectory
Test-Path -Path $expectedPath -PathType Container | Should -BeTrue
}

Copilot AI Apr 30, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This assertion only checks that the directories exist; it could still pass if the build accidentally flattens files into the module root while also creating empty (or unrelated) directories. To better guard against the original regression, also assert that expected content is nested (e.g., each directory contains at least one file) and/or that the module root does not contain files that should live under Public/Private/Classes/Data.

Copilot uses AI. Check for mistakes.

It 'preserves wrapped top-level folders in packaged output' {
{
& $Script:BuildScriptPath -TaskNames @('clean', 'build')

Copilot AI Apr 30, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invoking the real build from the meta test can be slow and can leave artifacts (e.g., Output/) behind after tests run locally, which may cause flaky runs or dirty working trees. Consider adding an AfterAll cleanup for the output directory (or running the build into a temporary output path if the build script supports it) to keep the test suite isolated and repeatable.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants