Skip to content

Commit b8e3464

Browse files
Mlaz-codeclaude
andcommitted
fix(ci): fall back to NPM_TOKEN for publish
Trusted Publisher (OIDC) config was returning 404 on PUT for the v0.2.5 release — npm masks permission denial as 404 to prevent package enumeration. The NPM_TOKEN secret is still configured in the repo (registered 2026-03-09); restore it as the auth source. The Trusted Publisher binding can be re-enabled later by confirming the workflow filename + repo + ref pattern still match what's configured at npmjs.com/package/@sharp-api/client/access. Until then, NPM_TOKEN is the path of least surprise. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 22494d9 commit b8e3464

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

.github/workflows/publish.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,14 @@ jobs:
5454
# Only publish on an actual release event. workflow_dispatch
5555
# runs through test+build as a dry run but must not upload.
5656
#
57-
# Trusted publishing (OIDC): npm picks up the GitHub OIDC token
58-
# automatically when no _authToken is configured. The trust is
59-
# registered at
57+
# Auth: NPM_TOKEN secret. The Trusted Publisher (OIDC) config at
6058
# 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.
59+
# was returning 404 on PUT for v0.2.5 (silent permission denial),
60+
# so we fall back to the long-lived NPM_TOKEN. Re-enable OIDC by
61+
# confirming the Trusted Publisher binding still maps to this
62+
# workflow filename + repo + ref pattern after any rename.
63+
# --provenance still emits the SLSA attestation either way.
6464
if: github.event_name == 'release'
65+
env:
66+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
6567
run: npm publish --provenance --access public

0 commit comments

Comments
 (0)