Skip to content

feat(js-host-api): add npm publishing workflow#36

Open
simongdavies wants to merge 1 commit intomainfrom
feat/npm-publish
Open

feat(js-host-api): add npm publishing workflow#36
simongdavies wants to merge 1 commit intomainfrom
feat/npm-publish

Conversation

@simongdavies
Copy link
Contributor

Summary

Adds cross-platform npm publishing for @hyperlight/js-host-api.

Changes

  • npm-publish.yml - New workflow that builds native binaries on Linux/Windows and publishes to npmjs.com
  • CreateRelease.yml - Calls npm-publish after creating GitHub release
  • package.json - Added napi targets and optionalDependencies for platform packages
  • npm/ - Platform-specific package.json files for Linux and Windows
  • .npmignore - Controls what gets published (includes generated index.js/index.d.ts)
  • README.md - Added publishing documentation

Usage

  • Manual: Actions → "Publish npm packages" → Run workflow (with optional dry-run)
  • Automatic: Triggers after CreateRelease on release/vX.Y.Z branches

Setup Required

Add NPM_TOKEN secret (npm access token with publish permissions for @hyperlight scope)

- Add npm-publish.yml workflow for cross-platform builds (Linux/Windows x64)
- Add platform-specific npm packages for native binaries
- Integrate npm publish into CreateRelease workflow
- Add .npmignore to control published files
- Update README with publishing documentation
@simongdavies simongdavies added the kind/enhancement New feature or improvement label Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement New feature or improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant