Skip to content

ci: revert _publish-npm.yaml to @v7 - #95

Merged
chcmedeiros merged 3 commits into
mainfrom
fix/revert-publish-npm-v7
Jul 30, 2026
Merged

ci: revert _publish-npm.yaml to @v7#95
chcmedeiros merged 3 commits into
mainfrom
fix/revert-publish-npm-v7

Conversation

@chcmedeiros

@chcmedeiros chcmedeiros commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Reverts the publish workflow from _publish-npm.yaml@v11 back to @v7.

Why

@v11 cannot publish to npm. Its npm upgrade step is a no-op — corepack prepare npm@latest --activate records the version in COREPACK_HOME but does not put that npm on PATH, so publishing runs on the runner's bundled npm. That npm predates OIDC trusted publishing, so it falls through to the placeholder _authToken that setup-node writes into .npmrc, and the registry reports the unauthorized publish as a misleading E404.

Current npm version: 10.9.8
Updated npm version: 10.9.8        ← upgrade silently did nothing
npm error 404 '<pkg>@<version>' is not in this registry.

It has already cost two releases:

Release Result npm
ledger-filecoin-js v3.0.10 E404 still 3.0.9
ledger-substrate-js v2.3.6 E404 still 2.3.5

@v7 uses npm install -g npm@latest, which does take effect — confirmed the same day on a run reporting Updated npm version: 12.0.1.

Scope

Only the reusable workflow ref changes. Nothing else is touched.

-    uses: zondax/_workflows/.github/workflows/_publish-npm.yaml@v11
+    uses: zondax/_workflows/.github/workflows/_publish-npm.yaml@v7

@v11's npm upgrade step is a no-op: `corepack prepare npm@latest
--activate` records the version in COREPACK_HOME but does not put that
npm on PATH, so publishing runs on the runner's bundled npm. That npm
predates OIDC trusted publishing, falls through to the placeholder
_authToken setup-node writes into .npmrc, and the registry reports the
unauthorized publish as a misleading E404.

Observed on ledger-filecoin-js v3.0.10:

    Current npm version: 10.9.8
    Updated npm version: 10.9.8
    npm error 404 '@zondax/ledger-filecoin@3.0.10' is not in this registry.

@v7 uses `npm install -g npm@latest`, which does take effect.

Stopgap only - revert this once Zondax/_workflows#114 lands and a new
tag is cut.
VALIDATION - do not merge as-is.

Repoints from @v7 to the branch behind Zondax/_workflows#114 so this
PR's dry-run actually exercises the fix on ubuntu-latest. The fix was
only verified locally on macOS; #114's own CI runs YAML lint and never
executes the publish workflow, so nothing has proven that
`corepack enable npm` behaves the same on a GitHub-hosted runner.

What the dry-run should show:
  Current npm version: 10.9.8
  Updated npm version: 12.x        <- was 10.9.8 on @v11
and the npm >= 11.5.1 assertion passing.

Once #114 merges and the v11 tag moves, this repo is fixed without any
change on its side - close this PR then. If the tag is not moved,
replace this ref with @v7 as the stopgap instead.
@chcmedeiros chcmedeiros changed the title ci: revert _publish-npm.yaml to @v7 (v11 cannot publish) [validation] point publish workflow at the _publish-npm fix branch Jul 30, 2026
Drops the temporary branch ref used to validate Zondax/_workflows#114.
This PR is now purely the @v11 -> @v7 revert.
@chcmedeiros chcmedeiros changed the title [validation] point publish workflow at the _publish-npm fix branch ci: revert _publish-npm.yaml to @v7 Jul 30, 2026
@chcmedeiros
chcmedeiros merged commit 4095ea2 into main Jul 30, 2026
6 checks passed
@chcmedeiros
chcmedeiros deleted the fix/revert-publish-npm-v7 branch July 30, 2026 09:10
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.

2 participants