Skip to content

ci: Add npm publish step to gnd binary build workflow#6460

Open
lutter wants to merge 3 commits intomasterfrom
lutter/gnd-publish
Open

ci: Add npm publish step to gnd binary build workflow#6460
lutter wants to merge 3 commits intomasterfrom
lutter/gnd-publish

Conversation

@lutter
Copy link
Copy Markdown
Collaborator

@lutter lutter commented Mar 27, 2026

Publish @graphprotocol/gnd-* platform packages to npm automatically after uploading release assets. Adds a dry_run input for testing.

This is needed so that graph-cli can use standard package.json mechanisms to download gnd (using optional dependencies gated on the platform)

This also addresses a few other issues that made the gnd-binary-build action fail

@lutter lutter requested a review from incrypto32 March 27, 2026 22:13
lutter added 2 commits March 30, 2026 13:43
Update the gnd binary build workflow with:
- Replace deprecated macos-13 runner with macos-14
- Bump GitHub Actions to Node.js 24-compatible versions
- Cache gnd binaries to skip builds when source is unchanged
- Use --clobber for release asset uploads
- Add publish-npm job that publishes per-platform @graphprotocol/gnd-*
  packages using npm trusted publishing (OIDC, no NPM_TOKEN needed)
- Support --tag for prerelease npm publishes
- Add dry_run workflow input for testing
@lutter lutter force-pushed the lutter/gnd-publish branch from 97a2932 to da51df5 Compare March 30, 2026 21:15
Add a wrapper package that installs the correct platform-specific gnd
binary via optionalDependencies. This enables `npm install -g
@graphprotocol/gnd` and `npx @graphprotocol/gnd`.

The wrapper includes:
- gnd/npm/bin/gnd.js: launcher script that resolves the platform binary
- gnd/npm/README.md: package documentation
- publish-npm-wrapper workflow job that runs after platform packages
@lutter lutter force-pushed the lutter/gnd-publish branch from da51df5 to ddec288 Compare March 30, 2026 21:44
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.

1 participant