Skip to content

docs(npm): correct trusted-publishing guidance (it works via the reusable workflow) - #104

Merged
jleni merged 2 commits into
mainfrom
fix/correct-oidc-trusted-publisher-docs
Jun 20, 2026
Merged

docs(npm): correct trusted-publishing guidance (it works via the reusable workflow)#104
jleni merged 2 commits into
mainfrom
fix/correct-oidc-trusted-publisher-docs

Conversation

@jleni

@jleni jleni commented Jun 20, 2026

Copy link
Copy Markdown
Member

Correction to #103

#103 claimed npm OIDC trusted publishing can't work through this reusable workflow. That's wrong — I jumped to it from @zondax/cli's symptom without checking the rest of the org. This PR fixes the misleading note.

What's actually true (org-wide evidence)

Most @zondax packages publish to npm through this reusable workflow, with OIDC and no token, and succeed:

Repo reusable @ver last release publish
ledger-casper-js v7 ✅ success (2026-06-19)
ledger-filecoin-js v7 ✅ success (2026-06-18)
ledger-substrate-js v9 ✅ success (2026-06-01)
ledger-peaq-js / stacks-js v7 / v5 ✅ success
ledger-mina-js / live-icp / zemu v5 / v7 / v6 ✅ success
ledger-flare-js v7 ❌ failed at "Publish package"
ledger-algorand-js main ❌ failed (old)

So the workflow is fine. npm validates the OIDC job_workflow_ref = this file (_publish-npm.yaml). The package's npm Trusted Publisher must therefore set:

  • Workflow filename = _publish-npm.yaml (this file), not the caller's filename.

@zondax/cli failed only because its Trusted Publisher named publish-npm.yaml (its caller). The working repos must have _publish-npm.yaml configured.

Who's actually affected

Only repos whose Trusted Publisher names their caller workflow rather than _publish-npm.yaml — concretely the two with failing publishes: ledger-flare-js and ledger-algorand-js. Fix = set their npm Trusted Publisher Workflow filename to _publish-npm.yaml (no code change).

(The OIDC-diagnostic fix from #103 is correct and retained.)

🤖 Generated with Claude Code

jleni added 2 commits June 20, 2026 18:22
…sable workflow

#103 wrongly stated OIDC trusted publishing can't work through this reusable
workflow. It does: many @Zondax packages (casper/filecoin/substrate/...) publish
via it with OIDC and no token. The real requirement is that the package's npm
Trusted Publisher must use Workflow filename '_publish-npm.yaml' (this file =
the job_workflow_ref npm matches), NOT the caller's workflow filename.

@zondax/cli failed only because its Trusted Publisher named 'publish-npm.yaml'
(its caller). Correct the header to give the right configuration.
…avior

Per npm docs, for reusable/workflow_call publishing the Trusted Publisher's
Workflow filename must be the CALLER's workflow (not this file), and npm flags
this path as finicky ('checks the calling workflow's name ... can cause
configuration mismatches'). Recommend self-contained publish as the reliable
fallback. Corrects my earlier '_publish-npm.yaml' guidance.
@jleni
jleni merged commit 9e5715e into main Jun 20, 2026
1 check passed
@jleni
jleni deleted the fix/correct-oidc-trusted-publisher-docs branch June 20, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant