Add NPM publishing step for CLI CI - #134
Merged
Merged
Conversation
kraenhansen
approved these changes
Aug 27, 2026
kraenhansen
left a comment
Member
There was a problem hiding this comment.
I find it curious that we're not checking these package.json files into git and instead generating them from scratch in the workflow. It will certainly work .. I'd does however make it harder to manually iterate without a CI roundtrip, but then again - an agent could probably easily reproduce these commands locally. Not a blocker for merging, more a reflection that you might want to consider.
| "type": "git", | ||
| "url": "https://github.com/elevenlabs/cli" | ||
| }, | ||
| "os": ["$(echo ${{ matrix.npm-platform-suffix }} | cut -d- -f1)"], |
Member
There was a problem hiding this comment.
Could be simpler if the npm-platform-suffix was instead derived from an os and arch 🤔
…rm pkg The launcher exited 0 when the CLI was killed by a signal: execFileSync reports status === null in that case and `"status" in e` is still true, so an interrupted run looked like a clean one. Exit 128 + signum instead. A failed require.resolve now names the missing optional dependency and how to reinstall, rather than printing a bare MODULE_NOT_FOUND stack. publish now needs audit, so a release cannot go out while cargo-audit is failing — npm versions are immutable once published. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The publish matrix compiled its own binaries on five runners while release.yml (cargo-dist) built and attested the same commit for the same tag. The two disagreed: with default features empty, Cargo.toml selects native-tls on macOS/Windows, whereas cargo-dist builds every target with features = ["rustls"]. npm users therefore got different TLS and cert behaviour from brew and scoop users, and the npm binaries carried no attestation. Download the archives from the release instead, verify each one with `gh attestation verify` before republishing it, and drop the rust toolchain, target, cache, musl-tools and cargo build steps. All five matrix legs now run on ubuntu-latest. A new await-release job waits for cargo-dist to upload the archives, since both workflows fire on the same tag push. The matrix carries os and arch, so the npm suffix is composed from them rather than split back apart with cut, and package.json os/cpu are literal matrix values (review feedback). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
No description provided.