Skip to content

Commit 117bcd4

Browse files
tablackburnclaude
andauthored
docs: update Repository secrets references to PSGALLERY_API_KEY (#26)
The README's Repository secrets table and explanation now use the renamed secret name. Simplifies the previous "set the secret as PS_GALLERY_KEY but the env var is PSGALLERY_API_KEY" caveat now that both names match. Adds an Unreleased CHANGELOG entry under "Changed" with a migration note for downstream modules. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 0125a71 commit 117bcd4

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,13 @@ own `CHANGELOG.md` (generated from `CHANGELOG.template.md` during init).
1212

1313
### Added
1414

15-
- "Repository secrets" section in `README.md` documenting the GitHub Actions secrets the bundled workflows expect (`PS_GALLERY_KEY`, `CODECOV_TOKEN`, `GITGUARDIAN_API_KEY`) — required vs. optional, source, and failure mode when missing.
15+
- "Repository secrets" section in `README.md` documenting the GitHub Actions secrets the bundled workflows expect (`PSGALLERY_API_KEY`, `CODECOV_TOKEN`, `GITGUARDIAN_API_KEY`) — required vs. optional, source, and failure mode when missing.
1616
- `Initialize-Template.ps1` now mentions configuring GitHub repository secrets in its post-init "Next steps" output, between the build-test step and the first push.
1717

18+
### Changed
19+
20+
- Renamed required PowerShell Gallery publish secret `PS_GALLERY_KEY``PSGALLERY_API_KEY` so the secret name matches the env var name PowerShellBuild reads (eliminating the previous mapping caveat). New modules created from the template after this change pick up the new name automatically. **Migration for existing modules:** create a new `PSGALLERY_API_KEY` repo secret with the same value, update `.github/workflows/PublishModuleToPowerShellGallery.yaml` to reference `secrets.PSGALLERY_API_KEY`, then delete the old `PS_GALLERY_KEY` secret.
21+
1822
## [2026.04.29] - 2026-04-29
1923

2024
### Added

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@ The bundled GitHub Actions workflows expect the following secrets to be set in y
7070

7171
| Secret | Workflow | Required? | Source | Failure if missing |
7272
|---|---|---|---|---|
73-
| `PS_GALLERY_KEY` | `PublishModuleToPowerShellGallery.yaml` | Required to publish | [PowerShell Gallery API keys](https://www.powershellgallery.com/account/apikeys) (scope to your module name) | Publish job fails at the PowerShellBuild authentication assertion |
73+
| `PSGALLERY_API_KEY` | `PublishModuleToPowerShellGallery.yaml` | Required to publish | [PowerShell Gallery API keys](https://www.powershellgallery.com/account/apikeys) (scope to your module name) | Publish job fails at the PowerShellBuild authentication assertion |
7474
| `CODECOV_TOKEN` | `CI.yaml` | Optional | [Codecov](https://about.codecov.io/) after linking the repository | Coverage upload step is gated with `fail_ci_if_error: false`, so CI still passes — no coverage data is uploaded |
7575
| `GITGUARDIAN_API_KEY` | `ggshield.yaml` | Required for that workflow to pass | [GitGuardian dashboard](https://dashboard.gitguardian.com/) (free tier available) | Workflow fails on every push with "Invalid GitGuardian API key" |
7676

7777
`GITHUB_TOKEN` is automatically provided by GitHub Actions and does not need to be set.
7878

79-
The publish workflow exposes `secrets.PS_GALLERY_KEY` to its job as the env var `PSGALLERY_API_KEY`the variable PowerShellBuild reads when publishing. Set the secret as `PS_GALLERY_KEY`.
79+
The publish workflow exposes this secret to its job under the same env var name (`PSGALLERY_API_KEY`), which is the variable PowerShellBuild reads.
8080

8181
## Placeholders
8282

0 commit comments

Comments
 (0)