Skip to content

ci: release and publish @supabase/postgrest-typegen via release-please - #111

Merged
spydon merged 1 commit into
mainfrom
ci/postgrest-typegen-release
Aug 28, 2026
Merged

spydon merged 1 commit into
mainfrom
ci/postgrest-typegen-release

Conversation

@spydon

@spydon spydon commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

What

Wires packages/postgrest-typegen into the existing release-please setup as its own component and adds an npm publish job, so the package can be released independently of the repo-root workflow versioning.

I checked supabase-js first: it uses a custom nx-based pipeline (release-stable / release-beta / release-canary scripts) that is tied to its single-version monorepo, so nothing there is directly reusable. This instead follows the release-please pattern already used in this repo and in iceberg-js.

Changes

  • release-please-config.json: adds packages/postgrest-typegen as a node component (bump-minor-pre-major, tags postgrest-typegen-vX.Y.Z). The root component now excludes packages/postgrest-typegen commits, so typegen changes no longer bump the reusable-workflows version.
  • .release-please-manifest.json: bootstraps the component at 0.0.0, so the first release PR proposes 0.1.0, matching the current package.json version.
  • .github/workflows/release.yml: exposes the per-component outputs and adds a publish-postgrest-typegen job that runs only when a postgrest-typegen release is created. It checks out the release tag, builds with bun (same as postgrest-typegen-validate.yml), and publishes with npm publish --access public --provenance via OIDC trusted publishing (no npm token secret).
  • packages/postgrest-typegen/package.json: removes "private": true so the publish step can run. Nothing publishes until a release PR is merged, which stays human-gated.
  • CLAUDE.md: documents the release flow.

Manual setup needed before the first release PR is merged

npm trusted publishing has to be configured on npmjs.com for @supabase/postgrest-typegen (Settings → Trusted publisher: GitHub Actions, repo supabase/sdk, workflow release.yml). Since the package does not exist on npm yet, the very first publish may need to be done manually with a granular token by an org owner, after which the OIDC flow takes over.

@spydon
spydon requested review from a team as code owners August 28, 2026 11:30
@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: cf1f1073-ab21-4f4e-a5f7-d669eaf56956


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@spydon
spydon merged commit 8e461e7 into main Aug 28, 2026
5 checks passed
@spydon
spydon deleted the ci/postgrest-typegen-release branch August 28, 2026 12:26
spydon added a commit that referenced this pull request Aug 28, 2026
## Summary

Stops versioning the repository root with release-please and versions
packages individually instead. The root `vX.Y.Z` release line ends at
`v1.5.0`; from here on, `packages/capability-matrix` and
`packages/postgrest-typegen` each have their own component, tags, and
changelog, and the compliance logic moves into the package that versions
it.

## What changed

- **`release-please-config.json`**: removes the root `"."` component.
Adds `packages/capability-matrix` as a `node` component (component name
`capability-matrix`, tags `capability-matrix-vX.Y.Z`).
`packages/postgrest-typegen` keeps the setup from #111. The symbol
extractors (`dart-symbol-extractor`, `go-symbol-extractor`) are
intentionally not release-managed.
- **`.release-please-manifest.json`**: replaces the `"."` entry with
`packages/capability-matrix` at `1.5.0`. capability-matrix continues the
root release line rather than restarting at `0.x`, so consumer pins
migrate from `v1.5.0` to `capability-matrix-v1.6.0` without a version
regression. `packages/capability-matrix/package.json` is aligned to
`1.5.0` for the same reason.
- **Composite actions**: the four `sdk-compliance-*` actions move from
`.github/actions/` to `packages/capability-matrix/actions/` (pure
renames), and the five reusable workflow wrappers update their
references. The wrappers resolve the actions through the `_sdk-spec`
checkout pinned at `job.workflow_sha`, so existing consumer pins keep
resolving the old layout at their own SHA; nothing breaks for repos
still on `v1.x`.
- **`CLAUDE.md`**: documents the new layout and release flow.

## First-release version pins

Release-please bootstraps a tagless component by scanning the entire
history, and it honors old unscoped `chore: release X.Y.Z` commits as
implicit Release-As overrides that beat the manifest version. That is
why #114 currently proposes 1.3.0 for postgrest-typegen: it picked up
`chore: release 1.3.0` (#97), which never touched the package. Both
components therefore carry a temporary pin:

- `packages/postgrest-typegen`: `release-as: 0.1.0`, matching its
`package.json`. #114 regenerates to 0.1.0 once this merges.
- `packages/capability-matrix`: `release-as: 1.6.0`, continuing the root
line.

`release-as` is sticky: each pin must be removed in a follow-up right
after that component's first release merges.

## How consumers version the reusable workflows after this

GitHub requires `workflow_call` workflows to live in
`.github/workflows/`, so the wrappers cannot move. With the compliance
logic inside `packages/capability-matrix`, any meaningful change to
workflow behavior lands in the package and cuts a
`capability-matrix-vX.Y.Z` tag. SDK repos pin that tag directly:

```yaml
uses: supabase/sdk/.github/workflows/[email protected]
```

A tag is just a ref, and `job.workflow_sha` resolves tooling, actions,
and spec from that same commit, so the whole bundle travels with the
capability-matrix version. Dependabot handles the prefixed tag format:
it derives the prefix from the current pin and only offers updates
within the same tag family, so `capability-matrix-v*` pins stay on their
line. The initial repin from `v1.x` is a one-time manual change per
consumer repo.

The wrappers become thin shims (checkout plus action reference). A
wrapper-only change does not bump the capability-matrix component by
itself; if one ever needs to ship alone, force a release with a
`Release-As: x.y.z` commit footer.

## Merge order

1. This PR.
2. The regenerated #114 (postgrest-typegen 0.1.0). Before its publish
job can succeed, `@supabase/postgrest-typegen` needs a one-time manual
bootstrap on npm: stub-publish a version below 0.1.0, then configure the
trusted publisher for `release.yml`.
3. Follow-ups: remove each `release-as` pin after that component's first
release, then bump consumer repo pins to `capability-matrix-v1.6.0`.
spydon added a commit that referenced this pull request Aug 31, 2026
…mits (#120)

## Summary

Removes the `release-as` entries from `release-please-config.json` for
both packages.

`release-as` pins every release PR to that exact version. The pins were
used to force the initial versions when the per-package release-please
setup landed (#111/#112), but both packages have since shipped those
versions (`capability-matrix` 1.6.0, `postgrest-typegen` 0.1.0), so the
pins now block any further version bump.

Concretely: #118 landed as a `feat` on `postgrest-typegen`, which with
`bump-minor-pre-major: true` should produce 0.2.0, but the release PR
#119 proposed a no-op `v0.1.0...v0.1.0` release with only a changelog
change because the config forced 0.1.0 again. `capability-matrix` would
hit the same wall on its next release.

Once this merges, release-please will refresh #119 to a proper 0.2.0
(changelog, `package.json`, and manifest bump).

## Test plan

- [x] `release-please-config.json` still validates against its $schema
(structure unchanged, only the two `release-as` keys removed)
- [ ] After merge: release-please refreshes #119 to `postgrest-typegen:
0.2.0`
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