Skip to content

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

Merged
lutter merged 3 commits intomasterfrom
lutter/gnd-publish
Apr 3, 2026
Merged

ci: Add npm publish step to gnd binary build workflow#6460
lutter merged 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 lutter force-pushed the lutter/gnd-publish branch 2 times, most recently from da51df5 to ddec288 Compare March 30, 2026 21:44
lutter added 3 commits April 3, 2026 15:58
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
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 ddec288 to 2b4675a Compare April 3, 2026 22:58
@lutter lutter merged commit 2b4675a into master Apr 3, 2026
6 checks passed
@lutter lutter deleted the lutter/gnd-publish branch April 3, 2026 23:18
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.

2 participants