The publish workflow serves maintainers who need reliable module delivery and release communication on every qualifying pull request.
Request
Current experience
The current publish path combines PowerShell Gallery publishing and GitHub Release creation in the same action execution flow. These operations have different failure modes, so a failure in one path can obscure the result of the other and make retries and incident handling harder to reason about.
Desired experience
PowerShell Gallery publishing and GitHub Release creation are orchestrated as separate responsibilities with independent execution and reporting. Each operation can succeed or fail on its own, and the workflow communicates each result without ambiguity.
Acceptance criteria
Publish-PSModule publishes to PowerShell Gallery only- GitHub Release creation is executed in a separate workflow step or action using Release-GHRepository or an equivalent dedicated release path
- Failure in Gallery publishing does not suppress release-step execution logic, and failure in release creation does not rewrite the Gallery result
- PR feedback is operation-scoped for publish, release, and cleanup
- Existing release and prerelease behavior remains supported for the repository workflows
Technical decisions
Responsibility boundary:Publish-PSModule is treated as a Gallery-only action. Release creation logic and release-note inputs are removed from this action interface.
Workflow orchestration:.github/workflows/Publish-Module.yml owns cross-step sequencing and conditions. Publish, release, and cleanup are modeled as separate steps with explicit conditions.
Failure isolation: The release step runs after a Gallery failure unless the job is cancelled. Prerelease cleanup runs after a successful stable release or an abandoned PR, but never after a failed release attempt.
Version authority:Resolve-PSModuleVersion remains the single source of the GitHub release tag. The workflow passes Publish.Module.Resolution.FullVersion to the release action; the Gallery action derives only the package version from the built manifest.
Cleanup ownership: Prerelease cleanup remains a separate concern. Release-PSModule owns the release-tag context used to exclude the current tag from cleanup.
Compatibility stance: This is a workflow/action interface refactor with contained repository blast radius. Behavior remains functionally equivalent for supported publish and release flows.
Implementation plan
Publish action refactor
Workflow orchestration changes
Cleanup and context wiring
Validation coverage
The publish workflow serves maintainers who need reliable module delivery and release communication on every qualifying pull request.
Request
Current experience
The current publish path combines PowerShell Gallery publishing and GitHub Release creation in the same action execution flow. These operations have different failure modes, so a failure in one path can obscure the result of the other and make retries and incident handling harder to reason about.
Desired experience
PowerShell Gallery publishing and GitHub Release creation are orchestrated as separate responsibilities with independent execution and reporting. Each operation can succeed or fail on its own, and the workflow communicates each result without ambiguity.
Acceptance criteria
Publish-PSModulepublishes to PowerShell Gallery onlyTechnical decisions
Responsibility boundary:
Publish-PSModuleis treated as a Gallery-only action. Release creation logic and release-note inputs are removed from this action interface.Workflow orchestration:
.github/workflows/Publish-Module.ymlowns cross-step sequencing and conditions. Publish, release, and cleanup are modeled as separate steps with explicit conditions.Failure isolation: The release step runs after a Gallery failure unless the job is cancelled. Prerelease cleanup runs after a successful stable release or an abandoned PR, but never after a failed release attempt.
Version authority:
Resolve-PSModuleVersionremains the single source of the GitHub release tag. The workflow passesPublish.Module.Resolution.FullVersionto the release action; the Gallery action derives only the package version from the built manifest.Cleanup ownership: Prerelease cleanup remains a separate concern.
Release-PSModuleowns the release-tag context used to exclude the current tag from cleanup.Compatibility stance: This is a workflow/action interface refactor with contained repository blast radius. Behavior remains functionally equivalent for supported publish and release flows.
Implementation plan
Publish action refactor
.github/actions/Publish-PSModule/src/publish.ps1.github/actions/Publish-PSModule/action.ymlPublish-PSModuleWorkflow orchestration changes
.github/workflows/Publish-Module.ymlCleanup and context wiring
Validation coverage
WhatIftest for prefixed prerelease release creation