Skip to content

Migrate CI/CD to clet's model, adapted for PowerShell Gallery (Install-Module) #5

Description

@tig

Tracks workstream C / checklist item 4 in PLAN.md, and supersedes the generic "replace OneBranch" task.

Migrate PSTui's CI/CD to mirror clet's model, adapted for a PowerShell binary module published to the PowerShell Gallery (not a NativeAOT CLI).


✅ Status (2026-06-24): functionally complete, 1.0.0 shipped

The pipeline migration is done and PSTui 1.0.0 is live on PSGallery (Install-Module PSTui, #6). The new workflows are on main:

  • .github/workflows/release.yml — push to main (on src/**/test/**/build files), workflow_dispatch (with version_override), and repository_dispatch: terminal-gui-published. Resolves version from PSTui.Common.props, builds + tests, stamps the manifest, Publish-PSResource to PSGallery, tags v${VERSION}, creates a GitHub Release with the packaged .zip, and opens/updates a release-failure issue on failure. Installs PS 7.6 (runners ship 7.4) so Test-ModuleManifest/Publish-PSResource accept the manifest.
  • .github/workflows/ci-test.yml — dev-loop CI: OS matrix (windows/macos/ubuntu), build + xUnit. Packaging/publishing stays in release.yml.

See the comment history below for the verified dry run and the PS-7.6 fix.

Remaining before this can close

  • Remove the Microsoft OneBranch pipeline.pipelines/ConsoleGuiTools-Official.yml is still in the tree on main and should be deleted (the only listed item that was never actually done).
  • Add an Install-Module smoke test — clean-runner job that installs the published (or staged) module, imports it, and invokes ocgv/shot. Not present yet.
  • (Minor) clet-parity gaps in ci-test.yml — add the dotnet format style check (once, on Linux) and fail-fast: false on the OS matrix.

Original scope

What to adopt from clet

  • Branching model: develop (default, day-to-day + PRs) → main (release-only). — ✅ done.
  • ci.yml: OS matrix (ubuntu/macos/windows), restore → build → test. — ✅ done as ci-test.yml (minus dotnet format / fail-fast: false, see above).
  • release.yml: push to main, workflow_dispatch, repository_dispatch from Terminal.Gui. — ✅ done.
  • Version resolution: RC vs stable split, auto-increment off latest matching tag, workflow_dispatch override. — ✅ done (PS prerelease labels are alphanumeric, so rc4 not clet's rc.4).
  • Tag job (v${VERSION}) and failure-notification issue on workflow failure. — ✅ done.

What differs (PowerShell module, not a NativeAOT CLI)

  • Publish to PowerShell Gallery — via Publish-PSResource (PSGallery API key as a repo secret), not dotnet tool/NuGet/Homebrew/WinGet.
  • Install-Module PSTui works end-to-end — correct .psd1, validated with Test-ModuleManifest; 1.0.0 installable from PSGallery (Publish PSTui 1.0.0 to the PowerShell Gallery #6).
  • Prerelease handlingVersionSuffixPrerelease in PSData (Install-Module PSTui -AllowPrerelease).
  • Attach the packaged module .zip to the GitHub Release.
  • Add an Install-Module smoke test (clean runner: install, import, invoke ocgv/shot). — not done.
  • Remove the Microsoft OneBranch pipeline (.pipelines/) and Azure-specific CI.not done; .pipelines/ConsoleGuiTools-Official.yml still present.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions