Skip to content

fix: enable npm OIDC publishing + reliable release tag pushes - #4

Merged
MD4 merged 2 commits into
masterfrom
fix/publish-npm-oidc-and-tag-push
Jun 11, 2026
Merged

fix: enable npm OIDC publishing + reliable release tag pushes#4
MD4 merged 2 commits into
masterfrom
fix/publish-npm-oidc-and-tag-push

Conversation

@MD4

@MD4 MD4 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #3. After #3 the publish workflows finally triggered on the lerna-format tags — but all 5 then failed at npm publish, and a normal multi-package release still wouldn't trigger them at all. This fixes both.

1. npm publish failed: trusted publishing needs newer npm/Node

The runs got:

npm error 404 Not Found - PUT https://registry.npmjs.org/@screeb%2fsdk-browser
npm error 404  '@screeb/sdk-browser@0.6.1' is not in this registry.

A 404 on PUT to an existing package = unauthorized (npm masks 401/403 as 404). The workflows publish tokenlessly via OIDC trusted publishing (--provenance, id-token: write, no NPM token). Per npm docs, trusted publishing requires npm CLI ≥ 11.5.1 and Node ≥ 22.14.0 — but the workflows ran Node 20 / npm 10.x, so the publish fell back to (absent) token auth.

Fix: bump the 5 JS publish workflows to node-version: '22' and add npm install -g npm@latest before publishing.

2. Multi-package releases didn't trigger any workflow

GitHub: "Events will not be created for tags when more than three tags are pushed at once." The chore(*): publish release created 7 tags and lerna pushed them together, so zero push events fired.

Fix: set command.version.push: false in lerna.json and push each tag in its own git push (push:release script) — one push event per tag, always under the limit. The release entrypoint stays npm run version, so CONTRIBUTING.md is unchanged.

After merge

The 5 pending versions (sdk-browser@0.6.1, sdk-react@0.7.1, sdk-angular@0.6.1, sdk-vue@0.2.1, react-native@3.3.1) still need publishing. Their tags currently point at the pre-fix commit, so they must be re-pointed to merged master (which has the fixed workflows) and re-pushed individually to publish. Nothing is on npm yet, so no version is burned.

Note (not fixed here)

npm publish warns the packages' repository.url normalizes to github.com/ScreebApp/sdk-js while this repo is ScreebApp/sdk. Worth aligning so provenance source matches the build repo.

MD4 added 2 commits June 11, 2026 13:06
Publish workflows failed at 'npm publish' with a masked 404 (unauthorized):
trusted publishing (OIDC, used here via --provenance with no NPM token)
requires npm CLI >= 11.5.1 and Node >= 22.14.0, but the workflows ran
Node 20 / npm 10.x. Bump publish workflows to Node 22 and upgrade npm to
latest before publishing.

Also fix the release flow so tag pushes actually trigger workflows:
GitHub creates no push events when more than 3 tags are pushed at once,
and lerna pushed all tags together. Set lerna command.version.push=false
and push each tag in its own 'git push' (push:release), one event per tag.
Packages referenced github.com/ScreebApp/sdk-js (and sdk-reactnative
its own repo). Align repository/bugs/homepage URLs to the actual repo
ScreebApp/sdk so npm provenance source matches the building repo.
@MD4
MD4 merged commit 666e08b into master Jun 11, 2026
2 of 3 checks passed
@MD4
MD4 deleted the fix/publish-npm-oidc-and-tag-push branch June 11, 2026 11:13
Alexays pushed a commit that referenced this pull request Jul 9, 2026
fix: enable npm OIDC publishing + reliable release tag pushes
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