DEV.md
June 26, 2026 · View on GitHub
Publishing releases
CI builds native binaries for three platforms on every push to main and on pull requests:
darwin-arm64linux-x64linux-arm64
Binaries are written to prebuilds/<platform>-<arch>/fontnik.node by CMake (Release builds) and uploaded as workflow artifacts.
Requires Node.js 20 or later (engines in package.json).
Release workflow
Publishing uses npm OIDC trusted publishing via .github/workflows/npm-release.yml. No npm token is required.
- Bump the version in
package.jsonand updateCHANGELOG.md - Open a PR, get it reviewed, and merge to
main - Go to Actions → NPM release → Run workflow
- Approve the
npm-releaseenvironment gate when prompted
The workflow builds and tests on all three platform runners, verifies the packed tarball, publishes to npm, and creates a GitHub release with auto-generated notes.
To test the pipeline without publishing, run the workflow with dry-run enabled.
Publishing happens only in CI; there is no local publish path. prepublishOnly runs check-binaries so an accidental local npm publish fails unless all three prebuilds are present.
The repo must have a GitHub Environment named npm-release configured before the first release (see the PSA linked above).
Local development
brew install cmake ninja boost zlib # macOS
npm ci --ignore-scripts
npm run rebuild
npm test
When a matching prebuild exists in prebuilds/, npm install skips compilation. Otherwise scripts/install-native.js runs npm run rebuild (unless CI=true).