Skip to content

ci: SDK release workflows for PyPI + npm (#36, #38) - #55

Merged
mkorbi merged 1 commit into
mainfrom
feat/sdk-publish-workflows
Jul 24, 2026
Merged

ci: SDK release workflows for PyPI + npm (#36, #38)#55
mkorbi merged 1 commit into
mainfrom
feat/sdk-publish-workflows

Conversation

@mkorbi

@mkorbi mkorbi commented Jul 20, 2026

Copy link
Copy Markdown
Member

Adds tag-triggered publish automation for both client SDKs — a release becomes a version bump + a tag instead of a manual build/upload. Addresses the npm-publish half of #36 and the PyPI-publish bullet of #38.

What's automated

  • Python → PyPI (release-python-sdk.yml): builds sdist+wheel, runs twine check, publishes via PyPI Trusted Publishing (OIDC — no stored token). Fires on a python-sdk-v* tag; workflow_dispatch can target TestPyPI for a rehearsal. pyproject.toml gains [project.urls], classifiers, keywords.
  • TypeScript → npm (release-typescript-sdk.yml): builds, tests, packs, publishes with provenance (id-token: write) using an NPM_TOKEN secret. Fires on a typescript-sdk-v* tag; workflow_dispatch defaults to a build/pack-only dry run. package.json gains repository/homepage/bugs/keywords, publishConfig (access public + provenance), sideEffects: false, and a prepublishOnly build.
  • RELEASING.md documents the one-time registry setup and the tag-to-release flow.

⚠️ Requires one-time registry setup (yours to do)

Publishing can't fully self-configure. Before the first release, per RELEASING.md:

  • PyPI: add a pending Trusted Publisher for project memsidecar, repo vibed-project/MemorySidecar, workflow release-python-sdk.yml, env pypi (and testpypi to rehearse).
  • npm: ensure the @memsidecar scope exists and add an automation token as the NPM_TOKEN repo secret.

I did not publish anything — that's outward-facing and needs those credentials.

Verification

Local: python -m build produces a wheel containing the client, gen stubs, and both ext adapters; npm pack includes the built dist + declarations; npm ci/build/test pass. Both workflow files pass actionlint. The workflows only trigger on their tags / manual dispatch, so they don't run on this PR.

Note: tag from main after #54 merges so the published SDKs include the regenerated stubs + wrappers. The remaining #38 items (docker-compose, examples/, memctl data-plane verbs) are follow-ups.

Add tag-triggered publish automation for both client SDKs so a release is a
version bump + a tag, not a manual build/upload.

- Python (`memsidecar` → PyPI): `release-python-sdk.yml` builds sdist+wheel,
  runs `twine check`, and publishes via PyPI Trusted Publishing (OIDC — no
  stored token). Fired by a `python-sdk-v*` tag; `workflow_dispatch` can target
  TestPyPI for a rehearsal. pyproject gains `[project.urls]`, classifiers, and
  keywords.
- TypeScript (`@memsidecar/client` → npm): `release-typescript-sdk.yml` builds,
  tests, packs, and publishes with provenance (`id-token: write`) using an
  `NPM_TOKEN` secret. Fired by a `typescript-sdk-v*` tag; `workflow_dispatch`
  defaults to a build/pack-only dry run. package.json gains repository/homepage/
  bugs/keywords, `publishConfig` (access public + provenance), `sideEffects:
  false`, and a `prepublishOnly` build.
- `RELEASING.md` documents the one-time registry setup (PyPI Trusted Publisher,
  npm token) and the tag-to-release flow.

Verified locally: `python -m build` produces a wheel containing the client, gen
stubs, and ext adapters; `npm pack` includes the built `dist`; both workflows
pass actionlint. Actual publishing is gated on the registry-side setup in
RELEASING.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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