Skip to content

Commit a9e8f77

Browse files
Mlaz-codeclaude
andcommitted
ci(publish): migrate npm publish to OIDC trusted publishing
Drops the legacy publish token. npm trusted publisher trust is now registered on npmjs.com (Sharp-API/sharpapi-ts → publish.yml), which lets `npm publish --provenance` pick up the GitHub OIDC token automatically without any env token configured. Matches sharpapi-python's PyPI trusted-publishing setup (no long- lived secret there either). --provenance still emits the SLSA attestation on each published version. The workflow already had `id-token: write` and `--provenance` from the release gating pass, so this commit just removes the NODE_AUTH_TOKEN env block. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent b1a24ec commit a9e8f77

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/publish.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,13 @@ jobs:
5353
- name: Publish to npm
5454
# Only publish on an actual release event. workflow_dispatch
5555
# runs through test+build as a dry run but must not upload.
56+
#
57+
# Trusted publishing (OIDC): npm picks up the GitHub OIDC token
58+
# automatically when no _authToken is configured. The trust is
59+
# registered at
60+
# https://www.npmjs.com/package/@sharp-api/client/access
61+
# (Trusted Publishers → Sharp-API/sharpapi-ts → publish.yml).
62+
# Drops the long-lived NPM_TOKEN secret that previously backed
63+
# this step. --provenance still emits the SLSA attestation.
5664
if: github.event_name == 'release'
5765
run: npm publish --provenance --access public
58-
env:
59-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)