ci(node): make npm-publish tag optional (default: latest master)#17
Merged
Conversation
The workflow_dispatch `tag` input is now optional: blank builds the latest master (checking out the dispatch ref and deriving the npm version from the workspace Cargo.toml), or pass a tag to build that release instead. An explicit `version` input still overrides either. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L7XwjsWSHWjrh39JxMLuB3
GitHub-hosted macOS runners are blocked in this environment, and darwin can't be cross-compiled on Linux (needs the Apple SDK), so the Intel-mac job hung waiting for a runner. Remove both darwin targets from the publish matrix and from napi.triples so the workflow ships prebuilds for Linux x64/arm64 and Windows x64; macOS users build from source. The matrix comment documents how to re-add darwin (with x86_64 cross-compiled on an arm runner) once macOS runners are available. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L7XwjsWSHWjrh39JxMLuB3
GitHub is retiring Node 20 as the action host runtime. Bump the flagged first-party actions to their Node 24 majors in both workflows: actions/checkout, actions/setup-node, actions/upload-artifact, actions/download-artifact → @v5. Drop-in (same inputs); clears the deprecation warnings. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L7XwjsWSHWjrh39JxMLuB3
The publish failed with 403: the npm token is scoped to @artiz.ru but the packages were unscoped (fleischwolf, fleischwolf-<triple>), which the token can't create. Rename the package to @artiz.ru/fleischwolf so it matches the token's scope — no token change needed. napi derives the platform packages as @artiz.ru/fleischwolf-<triple> and the loader's fallback require accordingly; both the main and platform packages publish with --access public (scoped packages are private by default). Update imports, self-reference, examples, READMEs, and the workflow's package-name references. The native binary base name stays fleischwolf.<triple>.node. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L7XwjsWSHWjrh39JxMLuB3
This reverts commit cd0b6bc.
…xamples - Root README: lead the Node/Bun section with `npm install fleischwolf` (prebuilt, no Rust needed) and a simple in-memory + file usage example; point at the examples folder. - examples/ is now a self-contained consumer project: add package.json depending on `fleischwolf` (^0.6.1) so `npm install` in the folder resolves the published package, with scripts to run each example. Add examples/.gitignore (node_modules, lockfiles, artifacts). Update the crate's example scripts and README to the `cd examples && npm install` flow. Verified: `npm install` in examples/ pulls the published package + platform binary, and both node-basic.mjs and bun-basic.ts run against it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L7XwjsWSHWjrh39JxMLuB3
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.
Follow-up to the merged Node/Bun bindings PR (#15). Makes the
npm publishworkflow'staginput optional so it can be run without typing a tag.What changed
.github/workflows/npm-publish.yml: theworkflow_dispatchtaginput is now optional.inputs.tag || github.ref) and derives the npm version from the workspaceCargo.toml.v0.7.0) → checks out and builds that release instead.versioninput still overrides either.Usage
…or Run workflow in the Actions tab with the field left empty.
The existing already-published guard makes a blank/master run a safe no-op when that version is already on npm.
Notes
NPM_TOKENrepo secret and ARM64 Linux runners (ubuntu-24.04-arm) enabled.🤖 Generated with Claude Code
Generated by Claude Code