ci(sdk): publish @ozpool/perplex-sdk to GitHub Packages#164
Merged
Conversation
Wires the existing TypeScript SDK in sdk/typescript/ for publishing to GitHub Packages so external dApps can `npm install @ozpool/perplex-sdk` without vendoring the types or the client. Changes - Rename the package from `@perplex/sdk` to `@ozpool/perplex-sdk`. The GitHub Packages npm registry only accepts a scope that matches the repo owner; @Perplex would have rejected on publish. No internal consumers — repo grep confirms zero `@perplex/sdk` imports outside the SDK's own metadata. - Add `publishConfig.registry` pointing at npm.pkg.github.com and bake `repository.directory` so generated package pages link straight to sdk/typescript/. - Include the package README in `files[]` so the rendered package page on GitHub Packages shows the install instructions. - New .github/workflows/publish-sdk.yml. Triggers on `sdk-v*` git tag push (and workflow_dispatch with an optional dry_run). Steps: checkout -> setup-node with the @ozpool scope wired -> npm ci -> typecheck -> build -> test -> npm publish. Uses the default GITHUB_TOKEN with `packages: write` permission, so no PAT or external secret needs to be configured. - New sdk/typescript/README.md (rendered on the package page) with registry setup + a REST client + WS client snippet + channels table. To publish a release: git tag sdk-v0.1.0 git push origin sdk-v0.1.0 Local build is green (`npm run build`); the existing 9 SDK tests still pass (`npm test`).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Wire the existing `sdk/typescript` package up for publishing to GitHub Packages so external dApps can install the typed Perplex client without vendoring.
What this PR does
To cut a release after merge
```bash
git tag sdk-v0.1.0
git push origin sdk-v0.1.0
```
Workflow watches `sdk-v*`; publish lands at `https://github.com/ozpool/Perplex/packages\`.
Test plan