You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
⚙️ [Maintenance]: Publish and release execution paths are now decoupled (#407)
PowerShell Gallery publishing and GitHub Release creation now run as
independent publish-pipeline responsibilities, so each operation reports
its own outcome and a partial release can be safely retried.
## Changed: Publishing and release operations are separate
`Publish-PSModule` now publishes the tested module artifact to
PowerShell Gallery only. GitHub release creation, release notes, and
release-asset upload run through the dedicated `Release-PSModule`
action.
## Technical Details
- The Plan job remains the single version authority:
`Publish.Module.Resolution.FullVersion` is passed directly to
`Release-PSModule` as the GitHub release tag.
- `Release-PSModule` detects an existing tag, resumes the module ZIP
upload, and exports the final tag and release URL as action outputs.
- Gallery and release steps have independent failure behavior; cleanup
only runs after a successful stable release, while abandoned-PR cleanup
remains supported.
- Cleanup receives the release tag through the release action's declared
output rather than shared environment state.
- The reusable workflow now uses job-scoped write permissions and a
pinned Ubuntu runner; both publishing actions have action-local READMEs.
- Pester covers prefixed prerelease `WhatIf` behavior and resuming an
existing release without recreating it. Full live publishing remains
intentionally out of scope.
<details>
<summary>Related issues</summary>
- #406
</details>
---------
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Publishes a pre-versioned PowerShell module artifact to the PowerShell Gallery. GitHub Release creation is intentionally handled by the separate [Release-PSModule](../Release-PSModule/README.md) action.
4
+
5
+
## Inputs
6
+
7
+
| Name | Description | Required | Default |
8
+
| --- | --- | --- | --- |
9
+
|`Name`| Name of the module to publish. | No | Repository name |
10
+
|`ModulePath`| Path containing the built `<Name>/` module directory. | No |`outputs/module`|
11
+
|`ArtifactName`| Name of the module artifact to download. | No |`module`|
12
+
|`APIKey`| PowerShell Gallery API key. | Yes | N/A |
13
+
|`WhatIf`| Logs publishing operations without publishing the module. | No |`false`|
14
+
|`WorkingDirectory`| Directory where the publishing script runs. | No |`.`|
15
+
16
+
## Outputs
17
+
18
+
This action does not provide outputs.
19
+
20
+
## Usage
21
+
22
+
```yaml
23
+
- name: Publish module
24
+
uses: ./.github/actions/Publish-PSModule
25
+
with:
26
+
Name: ExampleModule
27
+
ModulePath: outputs/module
28
+
ArtifactName: module
29
+
APIKey: ${{ secrets.APIKEY }}
30
+
```
31
+
32
+
Use [Release-PSModule](../Release-PSModule/README.md) in a separate workflow step to create the GitHub release from the same artifact.
description: Publish a pre-versioned PowerShell module artifact to the PowerShell Gallery and GitHub Releases.
2
+
description: Publish a pre-versioned PowerShell module artifact to the PowerShell Gallery.
3
3
author: PSModule
4
4
5
5
inputs:
@@ -14,36 +14,17 @@ inputs:
14
14
description: PowerShell Gallery API Key.
15
15
required: true
16
16
WhatIf:
17
-
description: If specified, the action will only log the changes it would make, but will not actually create or delete any releases or tags.
17
+
description: If specified, the action will only log the changes it would make, but will not publish the module.
18
18
required: false
19
19
default: 'false'
20
20
WorkingDirectory:
21
21
description: The working directory where the script will run from.
22
22
required: false
23
23
default: '.'
24
-
UsePRTitleAsReleaseName:
25
-
description: When enabled, uses the pull request title as the name for the GitHub release. If not set, the version string is used.
26
-
required: false
27
-
default: 'false'
28
-
UsePRBodyAsReleaseNotes:
29
-
description: When enabled, uses the pull request body as the release notes for the GitHub release. If not set, the release notes are auto-generated.
30
-
required: false
31
-
default: 'true'
32
-
UsePRTitleAsNotesHeading:
33
-
description: When enabled along with UsePRBodyAsReleaseNotes, the release notes will begin with the pull request title as a H1 heading followed by the pull request body. The title will reference the pull request number.
34
-
required: false
35
-
default: 'true'
36
24
ArtifactName:
37
25
description: Name of the uploaded artifact to download. Must match the name used in the upstream upload-artifact step.
38
26
required: false
39
27
default: module
40
-
VersionPrefix:
41
-
description: |
42
-
Prefix put in front of the version in the git tag of the GitHub release, for example 'v'.
43
-
Comes from Settings.Publish.Module.VersionPrefix, which the Plan job resolves. The compiled manifest carries the module version as
44
-
Major.Minor.Patch and cannot carry the prefix, so it is supplied here. An empty value tags the release without a prefix.
0 commit comments