This project uses a simple platform-specific binary distribution approach:
- Platform Detection: The package manager automatically installs only the compatible platform package based on your OS and architecture
- Direct Binary Access: Each platform package directly provides the
sqldbinary through itsbinfield - No Wrapper: No JavaScript wrapper or bootstrap code - the platform packages directly expose the native
sqldbinary
The project automatically checks for new libsql-server releases daily using GitHub Actions:
- Daily Check: Runs at 9 AM UTC to check for new releases from the libsql GitHub repository
- Binary Extraction: Downloads platform-specific tarballs and extracts the
sqldbinaries - Testing: Verifies that all binaries work correctly
- Publishing: Automatically publishes new versions to npm
- Git Commit: Commits the updated binaries to the repository
The project uses the following release artifacts for each platform:
- macOS ARM64:
libsql-server-aarch64-apple-darwin.tar.xz - macOS x64:
libsql-server-x86_64-apple-darwin.tar.xz - Linux ARM64:
libsql-server-aarch64-unknown-linux-gnu.tar.xz - Linux x64:
libsql-server-x86_64-unknown-linux-gnu.tar.xz
- Node.js 18+
tarcommand (available on macOS/Linux by default)- npm account with publishing permissions
# Check for new versions
npm run check-version
# Extract binaries from GitHub releases
npm run extract-binaries
# Build everything (check + extract)
npm run build
# Test all binaries
npm run testSet the versions across all packages & update the root's dependency specs
$ v=<version> npm run releaseSetting a --tag may not be desired depending on if its a prerelease
$ npm publish --force --ws --iwr --tag latest --access publicTwo workflows are included:
auto-publish.yml: Runs daily and on pushes to main, automatically publishes new versionstest.yml: Manual testing workflow that builds but doesn't publish
To set up automated publishing, add these secrets to your GitHub repository:
NPM_TOKEN: Your npm authentication token with publish permissions