Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ jobs:
needs: [release-please, stable-release]
if: needs.release-please.outputs.release_created == 'true'
runs-on: ubuntu-latest
environment: release-publish
permissions:
contents: read
id-token: write # npm trusted publishing (OIDC) — no NPM_TOKEN needed.
Expand Down Expand Up @@ -248,6 +249,7 @@ jobs:
needs: [release-please, stable-release]
if: needs.release-please.outputs.release_created == 'true'
runs-on: ubuntu-latest
environment: release-publish
permissions:
contents: read
id-token: write # PyPI trusted publishing (OIDC) — no PYPI_API_TOKEN needed.
Expand Down
7 changes: 5 additions & 2 deletions packaging/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ registries use OIDC trusted publishing — no long-lived tokens live in CI.
- Organization/user: `devr-tools`
- Repository: `codeguard`
- Workflow filename: `cd.yml` ← the caller, not release.yml
- Environment: *(leave blank)*
- Environment: `release-publish`
- Allowed actions: `npm publish`

Packages: `@devr-tools/codeguard` plus
Expand All @@ -127,7 +127,10 @@ registries use OIDC trusted publishing — no long-lived tokens live in CI.
command is still `codeguard`):
- Owner / repo: `devr-tools/codeguard`
- Workflow filename: `cd.yml` ← the publish job lives in cd.yml (same as npm)
- Environment: *(leave blank — the job sets none)*
- Environment: `release-publish`

Configure the GitHub `release-publish` environment with deployment branch
protection for the default branch and require reviewers before deployment.

This lets the `publish-pypi` job authenticate via `id-token: write` with no
long-lived token. (Alternatively, set a `PYPI_API_TOKEN` secret and pass it
Expand Down
Loading