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
{{ message }}
Repository navigation
Commit 4cf52d8
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: .github/actions/Publish-PSModule/README.md
+14-2Lines changed: 14 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,10 @@
1
1
# Publish-PSModule
2
2
3
-
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.
3
+
Publishes a pre-versioned, tested PowerShell module artifact to the PowerShell Gallery after source-bound ownership preflight. GitHub Release creation is handled by the separate [Release-PSModule](../Release-PSModule/README.md) action.
4
+
5
+
The publisher verifies the original source, exact resolved tag/version, producing repository/PR or direct-release context, and tested bytes before an external versioned-artifact mutation. An absent version is reserved with a create-only annotated tag containing the file-tree and ZIP SHA-256 proof. Existing tags are never updated or deleted.
6
+
7
+
An existing Gallery package is retained only when its raw nupkg payload matches that proof and the tested artifact. Package code is never imported to establish ownership. Unknown legacy proof, foreign tags/releases/assets, changed claims, authentication errors, and API failures stop publication explicitly.
4
8
5
9
## Inputs
6
10
@@ -10,6 +14,9 @@ Publishes a pre-versioned PowerShell module artifact to the PowerShell Gallery.
10
14
|`ModulePath`| Path containing the built `<Name>/` module directory. | No |`.PSModule/module`|
11
15
|`ArtifactName`| Name of the module artifact to download. | No |`module`|
12
16
|`PSGALLERY_API_KEY`| PowerShell Gallery API key. | Yes | N/A |
17
+
|`ReleaseTag`| Exact tag already resolved as `Publish.Module.Resolution.FullVersion`. | Yes | N/A |
18
+
|`CommitSha`| Immutable commit that produced the tested artifact. | No | Original workflow `GITHUB_SHA`|
19
+
|`PullRequest`| Normalized producing-PR context; empty for a direct stable release. | No | Empty |
13
20
|`WhatIf`| Logs publishing operations without publishing the module. | No |`false`|
14
21
|`WorkingDirectory`| Directory where the publishing script runs. | No |`.`|
15
22
@@ -27,6 +34,11 @@ This action does not provide outputs.
Use [Release-PSModule](../Release-PSModule/README.md) in a separate workflow step to create the GitHub release from the same artifact.
42
+
Provide `GH_TOKEN` with contents-write access scoped to the consumer repository. The reusable workflow supplies its existing GitHub App token and resolved context internally.
43
+
44
+
Use [Release-PSModule](../Release-PSModule/README.md) in a separate step to create the GitHub release from the same source and tested artifact. A retry must retain the original coordinates and bytes; unproven legacy publication requires reviewed forward-only recovery, not numeric guessing, retagging, or metadata changes.
Copy file name to clipboardExpand all lines: .github/actions/Release-PSModule/README.md
+10-2Lines changed: 10 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Release-PSModule
2
2
3
-
Creates or resumes a GitHub release for a pre-versionedPowerShell module artifact. The action attaches the exact built module ZIP to the release and reports the result on the source pull request.
3
+
Creates or resumes a GitHub release for a pre-versioned, tested PowerShell module artifact. The action verifies the same immutable source/context/artifact claim as the Gallery publisher, attaches repeatable module ZIP bytes, and reports the result on the producing pull request when available.
4
4
5
5
## Inputs
6
6
@@ -10,6 +10,8 @@ Creates or resumes a GitHub release for a pre-versioned PowerShell module artifa
10
10
|`ModulePath`| Path containing the built `<Name>/` module directory. | No |`.PSModule/module`|
11
11
|`ArtifactName`| Name of the module artifact to download. | No |`module`|
12
12
|`ReleaseTag`| Full GitHub release tag resolved by `Resolve-PSModuleVersion`. | Yes | N/A |
13
+
|`CommitSha`| Original immutable build source for stable and prerelease tags. | No | Original workflow `GITHUB_SHA`|
14
+
|`PullRequest`| Normalized producing-PR context; empty for a direct stable release. | No | Empty |
13
15
|`WhatIf`| Logs release operations without creating or uploading anything. | No |`false`|
14
16
|`WorkingDirectory`| Directory where the release script runs. | No |`.`|
15
17
|`UsePRTitleAsReleaseName`| Uses the pull request title as the release name. | No |`false`|
@@ -36,6 +38,12 @@ Pass the Plan job's resolved `FullVersion` as `ReleaseTag` so the configured tag
The action requires a `pull_request` event and a built module artifact. If a release already exists for `ReleaseTag`, it resumes by replacing the module ZIP, which makes retrying a partial release safe.
45
+
The action supports normalized pull-request context and direct stable releases. Provide repository-scoped contents-write `GH_TOKEN` access and the original tested artifact/source. Tags resolve to actual commits, including annotated tags; mutable branch names and release target hints are not ownership proof.
46
+
47
+
Release creation and upload recheck the tag, provenance, and artifact identity. A missing upload can resume. An existing asset is retained only when its published SHA-256 matches the exact local ZIP; differing, ambiguous, or unverifiable bytes stop the action. Uploads never use `--clobber`, and tags are never retargeted.
48
+
49
+
Complete authored or generated prerelease notes precede a final repository/producing-PR/source footer. A matching tag/source does not authorize another PR's release. Legacy records without proof require reviewed forward-only recovery; the action does not fabricate provenance or alter consumer metadata.
0 commit comments