Skip to content

ci(next): publish react-sdk and vite-plugin alongside web-client on release#36

Merged
WiktorStarczewski merged 3 commits into
nextfrom
wiktor/publish-react-sdk-on-release-next
Apr 28, 2026
Merged

ci(next): publish react-sdk and vite-plugin alongside web-client on release#36
WiktorStarczewski merged 3 commits into
nextfrom
wiktor/publish-react-sdk-on-release-next

Conversation

@WiktorStarczewski
Copy link
Copy Markdown
Collaborator

Companion to #35 (the main-branch fix), adapted to next's napi-augmented release workflow.

Why this is needed on next too

The release workflow on next is more complex than main's — it builds and publishes Node.js native binaries (@miden-sdk/node-darwin-arm64, @miden-sdk/node-darwin-x64, @miden-sdk/node-linux-x64-gnu) that came in via the PR #13 sync. But it has the same gap as main: it only publishes @miden-sdk/miden-sdk, never @miden-sdk/react or @miden-sdk/vite-plugin. End users running npm install @miden-sdk/react after a v0.15.x release would still be stuck on whatever the next dist-tag points at.

Changes

  • Adds the same two scripts as ci: publish react-sdk and vite-plugin alongside web-client on release #35: scripts/check-react-sdk-version-release.sh + scripts/check-vite-plugin-version-release.sh (identical files).
  • The existing check-version job now also computes react_should_publish / vite_should_publish outputs.
  • The publish job runs whenever any of the three packages needs to ship; each step is individually gated so a release that bumps only one package republishes only that one.
  • The Node.js platform packages (node-sdk-*) remain tied to the web-client publish — they only ship when web-client itself ships, so the optionalDependencies versions on web-client's package.json always match a real published platform-binary version.
  • The skipped job now fires only when all three are not-publishing (instead of just web-client).

Why two PRs

next and main have meaningfully different release workflows (next has napi platform builds; main doesn't). I'd rather fix each independently than make either land first conditionally. When PR #32 (next → main for v0.15.0) merges, main will inherit next's full workflow including this fix.

… (next)

Same fix as the main-branch PR (#35),
adapted to the napi-augmented release workflow on next:

- New scripts: check-react-sdk-version-release.sh + check-vite-plugin-version-release.sh
  (identical to main-side; also part of #35).
- check-version job now computes should_publish + current_version outputs
  for all three packages.
- publish job runs whenever ANY of the three needs to ship. Each step is
  individually gated so a release that bumps only one package republishes
  only that one. The Node.js platform packages (node-sdk-*) remain tied
  to the web-client publish so optionalDependencies versions match.
- skipped job fires only when all three are not-publishing.
Previously the release-publish gate skipped the entire publish when the
release tag's last commit didn't touch the package's package.json. That
made the bump commit semantically required to be HEAD of the release tag,
which is silly — the question is just whether the version is already
on the registry.

Switch all three scripts (web-client, react-sdk, vite-plugin) to query
`npm view <pkg>@<version>` and publish iff that version isn't there yet.
Removes the spurious dependency on commit ordering relative to the tag.
@WiktorStarczewski WiktorStarczewski enabled auto-merge (squash) April 28, 2026 20:49
Match the secret name to the cargo env var (and to miden-node's
convention) so the publish-crates workflow picks up the org-managed
secret without an indirection.
@WiktorStarczewski WiktorStarczewski merged commit 7ddd2eb into next Apr 28, 2026
27 checks passed
@WiktorStarczewski WiktorStarczewski deleted the wiktor/publish-react-sdk-on-release-next branch April 28, 2026 21:39
@WiktorStarczewski WiktorStarczewski mentioned this pull request Apr 28, 2026
4 tasks
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