Version-lock npm publish and bundle native binaries#12
Merged
Conversation
Contributor
Author
|
Verified end-to-end: dispatched this branch with Root cause of the prior npm failures uncovered + fixed here: |
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.
Why
A web4 (daemon) release reached no downstream channel. npm stopped at 1.10.2 (May 19) — exactly when the publish workflows were deleted from web4. The publish workflow here had no version input, took its version from stale
package.json(1.9.1), and shipped no native binaries (filesdidn't even includebin/; theoptionalDependenciesplatform packages it relied on were never published to npm).What
Rewrites
publish.ymlso it:versionworkflow_dispatch input (web4's release pipeline dispatches it at the daemon tag). Keeps the legacyrelease: publishedtrigger.package.jsonversion to the dispatched version → version-locked to the daemon.bin/<os>-<arch>/(the pathsrc/ffi.tsresolves):libpilot.{so,dylib}frompilot-protocol/libpilotagainst the sibling-module checkout set, daemon binaries from web4 at the tag. Linux + darwin jobs each upload their subtree; the publish job merges them into one multi-platform package.npm publish --provenance --access public, skipping if the version already exists (idempotent).Also in
package.json:bin/tofiles(so the bundled binaries are actually packed).optionalDependenciesonpilotprotocol-{darwin,linux}-*platform packages that were never published to npm and are now redundant (binaries are bundled directly).Requires existing secret
NPM_TOKEN(present).Part of the release fan-out (web4 + sdk-python + this).