Skip to content

Add NPM publishing step for CLI CI - #134

Merged
PaulAsjes merged 4 commits into
mainfrom
pma/npm-publish-step
Aug 27, 2026
Merged

Add NPM publishing step for CLI CI#134
PaulAsjes merged 4 commits into
mainfrom
pma/npm-publish-step

Conversation

@PaulAsjes

Copy link
Copy Markdown
Collaborator

No description provided.

@kraenhansen kraenhansen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread .github/workflows/ci.yml Outdated
"type": "git",
"url": "https://github.com/elevenlabs/cli"
},
"os": ["$(echo ${{ matrix.npm-platform-suffix }} | cut -d- -f1)"],

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be simpler if the npm-platform-suffix was instead derived from an os and arch 🤔

PaulAsjes and others added 2 commits August 27, 2026 16:31
…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>
@PaulAsjes
PaulAsjes merged commit 217f179 into main Aug 27, 2026
8 checks passed
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.

2 participants