ci(release): pin @napi-rs/cli to 3.8.6 and make PyPI/Maven publish idempotent - #594
Merged
Merged
Conversation
hogan-yuan
force-pushed
the
ci/pin-napi-cli
branch
from
September 14, 2026 06:23
6e492a2 to
0d154db
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two related release-workflow fixes so v5.0.0's Node.js SDK can be published and
future release re-runs are safe.
1. Fix npm publish — pin @napi-rs/cli to 3.8.6
publish-nodejs-sdkinstalled the napi CLI unpinned (npm install -g @napi-rs/cli),so it floated to latest. v5.0.0 picked up 3.9.1, whose
napi prepublish(run via
prepublishOnlybeforenpm publish) fails with:Not transient — reproduced identically on two re-runs, and v5.0.0 never reached
npm (still 4.5.0). v4.5.0 (2026-08-14) published cleanly on 3.8.6 (latest at
the time); 3.9.0 (09-02) / 3.9.1 (09-10) broke it. Pinned to
@napi-rs/cli@3.8.6.2. Make PyPI / Maven publish idempotent
So the release can be safely re-cut (e.g. to retry one SDK's publish) without the
already-published SDKs failing:
pypa/gh-action-pypi-publishnow usesskip-existing: true(wasunset → errored on an already-published version).
that checks
repo1.maven.org/.../io/github/longbridge/openapi-sdk/<version>/and skips
Update version/Import GPG/Deploywhen the version alreadyexists.
crates.io was already guarded (
check published version), so all four registriesare now re-run-safe.
After merge — publishing npm 5.0.0
With this merged, advancing the
releasebranch to a commit containing thesefixes re-runs the Release workflow: crates.io skips, PyPI skip-existing, Maven
skips (5.0.0 already there), and nodejs publishes 5.0.0 with the pinned napi.
Companion PR #593 splits the cpp BJ/HK uploads so those no longer flake the run.