Skip to content

ci(sdk): publish @ozpool/perplex-sdk to GitHub Packages - #164

Merged
ozpool merged 1 commit into
mainfrom
ci/publish-sdk-github-packages
May 28, 2026
Merged

ci(sdk): publish @ozpool/perplex-sdk to GitHub Packages#164
ozpool merged 1 commit into
mainfrom
ci/publish-sdk-github-packages

Conversation

@ozpool

Copy link
Copy Markdown
Owner

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

  • Rename `@perplex/sdk` → `@ozpool/perplex-sdk`. GitHub Packages requires the npm scope to match the repo owner. No internal consumers — repo grep confirms zero imports outside the SDK's own metadata.
  • Add `publishConfig.registry = https://npm.pkg.github.com\` so `npm publish` lands on GitHub Packages even when the user's default registry is npmjs.org.
  • New `.github/workflows/publish-sdk.yml`:
    • Triggers on `sdk-v*` git tag push (also manual dispatch with an optional `dry_run`).
    • Uses the default `GITHUB_TOKEN` with `packages: write` — no PAT to configure.
    • Build → typecheck → test → publish in that order; a red build never publishes.
  • New `sdk/typescript/README.md` rendered on the package page. Shows the `.npmrc` scope setup, REST + WS client snippets, and the channels table.

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

  • `npm run build` clean
  • `npm test` — 9 / 9 pass
  • After merge: tag `sdk-v0.1.0`, confirm workflow goes green and the package appears under repo Packages

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`).
@ozpool
ozpool merged commit 86c9eac into mainMay 28, 2026
3 of 4 checks passed
Sign up for freeto 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

@ozpool