Skip to content

Commit 0ac9a29

Browse files
Name PowerShell Gallery credential consistently
Make PSGALLERY_API_KEY explicit across Process-PSModule documentation while retaining the Publish-PSModule action input name as APIKey. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 3c27c41 commit 0ac9a29

7 files changed

Lines changed: 12 additions & 12 deletions

File tree

.github/actions/Publish-PSModule/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Publishes a pre-versioned PowerShell module artifact to the PowerShell Gallery.
99
| `Name` | Name of the module to publish. | No | Repository name |
1010
| `ModulePath` | Path containing the built `<Name>/` module directory. | No | `outputs/module` |
1111
| `ArtifactName` | Name of the module artifact to download. | No | `module` |
12-
| `APIKey` | PowerShell Gallery API key. | Yes | N/A |
12+
| `APIKey` | PowerShell Gallery API key supplied from the caller's `PSGALLERY_API_KEY` secret. | Yes | N/A |
1313
| `WhatIf` | Logs publishing operations without publishing the module. | No | `false` |
1414
| `WorkingDirectory` | Directory where the publishing script runs. | No | `.` |
1515

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ It covers getting started, the pipeline stages, usage, configuration, repository
1414

1515
## Reusable workflow secrets (GitHub App auth)
1616

17-
When calling `./.github/workflows/workflow.yml`, pass the PowerShell Gallery API key and GitHub App credentials using these reusable-workflow secret names:
17+
When calling `./.github/workflows/workflow.yml`, pass the PowerShell Gallery credential as `PSGALLERY_API_KEY` and GitHub App credentials using these reusable-workflow secret names:
1818

1919
- `PSGALLERY_API_KEY`
2020
- `GitHubAppClientId`
@@ -32,6 +32,6 @@ jobs:
3232
GitHubAppPrivateKey: ${{ secrets.SHELLY_PRIVATE_KEY }}
3333
```
3434
35-
This is a required contract. `PSGALLERY_API_KEY` publishes the module to the PowerShell Gallery; the GitHub App credentials mint an installation token for GitHub operations via `GH_TOKEN`, with no `github.token` fallback in that path. This is a breaking rename from the previous `APIKey`/`APIKEY` workflow secret.
35+
This is a required contract. `PSGALLERY_API_KEY` publishes the module to the PowerShell Gallery; the GitHub App credentials mint an installation token for GitHub operations via `GH_TOKEN`, with no `github.token` fallback in that path.
3636

3737
See the [GitHub App authentication guide](https://psmodule.io/docs/guides/github-app-authentication/) for the caller mapping, per-workflow permissions and repository scoping, and token injection details.

docs/content/get-started/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Start new modules from the PSModule template repository:
1111
## Quickstart
1212

1313
1. [Create a new repository from the template](https://github.com/new?template_name=Template-PSModule&template_owner=PSModule&description=Add%20a%20description%20(required)&name=%3CModule%20name%3E).
14-
2. [Configure the repository](repository-setup.md) — GitHub Pages, the PowerShell Gallery API key, and the caller workflow.
14+
2. [Configure the repository](repository-setup.md) — GitHub Pages, `PSGALLERY_API_KEY`, and the caller workflow.
1515
3. Replace placeholder metadata and remove scaffold sample files.
1616
4. Add your first public command and tests.
1717
5. Validate `.github/PSModule.yml` defaults for your module.
@@ -30,7 +30,7 @@ If the module needs several interdependent commands before it is usable at all,
3030

3131
| Page | Description |
3232
| --- | --- |
33-
| [Repository setup](repository-setup.md) | GitHub Pages, the PowerShell Gallery API key, permissions, and the caller workflow. |
33+
| [Repository setup](repository-setup.md) | GitHub Pages, `PSGALLERY_API_KEY`, permissions, and the caller workflow. |
3434
| [Your first release](your-first-release.md) | The pull request flow, version labels, and what happens on merge. |
3535
| [Module bootstrap](module-bootstrap.md) | Getting a brand-new module to its first release with an integration branch. |
3636

docs/content/get-started/repository-setup.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Repository setup
3-
description: Configure GitHub Pages, the PowerShell Gallery API key, permissions, and the caller workflow so Process-PSModule can build and publish the module.
3+
description: Configure GitHub Pages, `PSGALLERY_API_KEY`, permissions, and the caller workflow so Process-PSModule can build and publish the module.
44
---
55

66
# Repository setup
@@ -18,14 +18,14 @@ This creates an environment called `github-pages` that GitHub deploys the docume
1818
<img src="../media/pagesEnvironment.png" alt="Remove the branch protection on main">
1919
</details>
2020

21-
## 2. Create a PowerShell Gallery API key
21+
## 2. Create `PSGALLERY_API_KEY`
2222

2323
1. [Create an API key on the PowerShell Gallery](https://www.powershellgallery.com/account/apikeys). Give it permission
2424
to manage the module you are working on.
25-
2. Create a repository secret called `PSGALLERY_API_KEY` and set the API key as its value.
25+
2. Create a repository or organization secret called `PSGALLERY_API_KEY` and set the API key as its value.
2626

2727
If you plan to create many modules, use a glob pattern for the API key permissions in the PowerShell Gallery and store
28-
the secret on the organization instead of on each repository.
28+
`PSGALLERY_API_KEY` on the organization instead of on each repository.
2929

3030
## 3. Add the caller workflow
3131

docs/content/guides/calling-the-workflow.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
5858
The reusable workflow at `.github/workflows/workflow.yml` declares four workflow-call secrets,
5959
which keeps the calling workflow in full control of the credentials that are exposed.
60-
`secrets: inherit` is intentionally not required. `APIKey` publishes to the PowerShell Gallery,
60+
`secrets: inherit` is intentionally not required. `PSGALLERY_API_KEY` publishes to the PowerShell Gallery,
6161
`GitHubAppClientId` and `GitHubAppPrivateKey` authenticate GitHub API operations, and `TestData`
6262
carries everything the module's own tests need.
6363

docs/content/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ New to Process-PSModule? Work through these in order.
2222
| Page | Description |
2323
| --- | --- |
2424
| [Get started](get-started/index.md) | Create a module repository from the template and get the pipeline running. |
25-
| [Repository setup](get-started/repository-setup.md) | Configure GitHub Pages, the PowerShell Gallery API key, permissions, and the caller workflow. |
25+
| [Repository setup](get-started/repository-setup.md) | Configure GitHub Pages, `PSGALLERY_API_KEY`, permissions, and the caller workflow. |
2626
| [Your first release](get-started/your-first-release.md) | The pull request flow, version labels, and what happens on merge. |
2727

2828
## Guides

docs/content/specification/design.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The behaviour in the [spec](spec.md) is delivered by a **single reusable GitHub
1212
### Single entry point
1313

1414
The reusable workflow accepts a caller workflow and minimal caller configuration: a `pull_request`-triggered job that
15-
calls `workflow.yml` and passes the `APIKey` secret. The full caller template is in
15+
calls `workflow.yml` and passes the `PSGALLERY_API_KEY` secret. The full caller template is in
1616
[Repository setup](../get-started/repository-setup.md#3-add-the-caller-workflow), and the interface it targets is
1717
documented in [Workflow inputs](../reference/workflow-inputs.md).
1818

0 commit comments

Comments
 (0)