Skip to content

ci(release): publish @systemfsoftware/drizzle-pg-extras through trusted publishing - #5

Merged
ryanleecode merged 9 commits into
mainfrom
release-enrollment
Nov 21, 2026
Merged

ryanleecode merged 9 commits into
mainfrom
release-enrollment

Conversation

@systemfsoftware-maker

@systemfsoftware-maker systemfsoftware-maker commented Nov 20, 2026 •

Copy link
Copy Markdown

Summary

Once this merges and the owner enrolls trusted publishing, every push to main can publish the package to npm as @systemfsoftware/drizzle-pg-extras through the shared release workflow's OIDC trusted publishing, with no npm token. The unscoped name drizzle-pg-extras belongs to the upstream author, so the scoped name is the one this repository can publish. The CLI is still drizzle-pg-extras.

Owner steps: merge first, then enroll

Merge this PR first, so release.yml exists on main. Then run:

npx npm@^11.15.0 login
nix run github:systemfsoftware/pnpm-release-management#npm-trust -- systemfsoftware/drizzle-pg-extras

npm-trust reserves @systemfsoftware/drizzle-pg-extras with 0.0.0-bootstrap.0, then trusts systemfsoftware/drizzle-pg-extras and the caller workflow file it finds, release.yml. The npm session needs publish rights in the @systemfsoftware scope (inferred, not observed).

The first Release run happens on the merge, before enrollment. It is expected to tag @systemfsoftware/drizzle-pg-extras@v0.6.0 and create the GitHub Release, then fail at publish, because npm does not yet trust the workflow. That is inferred from the release workflow's README and has not been observed. After enrolling, run Release on main (Actions, workflow_dispatch) or re-run the failed job; it publishes 0.6.0 and waits until it installs.

Why the package moved into packages/drizzle-pg-extras

The shared release tooling drops a package that sits at the workspace root: the member list skips the root row, and the flake's workspace reader cannot parse . as an entry. A root-only package would get no version PRs, tags, GitHub Releases or change intents, so the root is now a private manifest and the package is its only member. Files moved with git mv, so history follows them. The published surface (exports map, bin, files, engines, peers, licence) is unchanged.

What else changed

  • pnpm is pinned to 12.9.0, the version the flake provides; the flake build fails on any other pin. The lockfile was regenerated with it, and no third-party package changed version.
  • VERSION now comes from the package manifest, so a release PR edits package.json and CHANGELOG.md only. The built dist/ carries the literal and does not read the manifest at runtime.
  • release.yml is the organisation's caller. It differs from effect-daemon's only in the pinned revision of the shared workflow (below).
  • ci.yml accepts workflow_dispatch, which the release workflow needs to run CI on the release PR branch, and runs attw and publint inside the package. The drizzle 1.0 job installs exactly 1.0.0-rc.5: under pnpm 12.9 the rc tag resolved to the older 1.0.0-rc.5-ab785fc snapshot, whose drizzle-kit fails the snapshot-chain tests (pnpm 12.21 resolved 1.0.0-rc.5). Job names and checks / check are unchanged.
  • release.jsonc, .changeset/ and a flake (workspace-tarballs, dev shell with Node 24 and pnpm 12) are what the release workflow reads from a caller.

Decisions for the owner

  • Pinned revision. The caller pins the shared workflow at 9615867c17489fb04be8bc74f568659d687df612, which five of the seven organisation libraries use. effect-daemon uses 1e897828d917341fb7dd444c7bbd6cfa0998caa9, which adds a fix for a race where a run queued behind a release-PR merge reopens a release PR for versions that already shipped. Switching is a one-line change.
  • First version. No change intent is included, so the first publish is the current 0.6.0. Add an intent afterwards for another number.
  • Not included: the Nix cache push (needs an environment and secrets), a changeset-check workflow, and a root README.md; the package README sits in packages/drizzle-pg-extras.

Follow-up

The plan's objective says every published version comes from the release workflow. The 0.0.0-bootstrap.0 placeholder is published by hand during enrollment, so the objective wants rewording.

Testing

Run in the package: typecheck, lint, dprint check, the 64 unit tests, the build, attw and publint all pass. The built CLI keeps its shebang and the built VERSION matches the manifest. The flake evaluates: workspace-tarballs lists the scoped package and the dev shell gives pnpm 12.9.0.

Not run here, pending off-host:

  • Postgres and TimescaleDB integration tests: this PR's CI. The Timescale test now reads the manifest version instead of a literal. No separate VERSION unit test was added, because the repository's test rules refuse tests that import from src/.
  • nix build .#workspace-tarballs, then nix build --rebuild .#workspace-tarballs, which also gives the cold-build time. Neither was run.
  • The release tools' plan and bump on the merged tree, then the first real Release run.
  • Independent review. No code review ran in this change.

Compound Engineering

…orkflow

- Scoped package name, workspace-member layout, flake, release caller, and the enrollment order for the owner.
…e/drizzle-pg-extras

- The release tooling lists workspace members and drops the root package, so the package moves to packages/drizzle-pg-extras under a private root.
- Rename to @systemfsoftware/drizzle-pg-extras; the CLI bin stays drizzle-pg-extras and runtime identifiers are unchanged.
- Pin pnpm 12.9.0, the version the flake provides, and regenerate the lockfile with it.
- Derive VERSION from the package manifest so a release edits no source file.
- Run attw, publint and the rc install inside the member; let ci.yml be dispatched.
- packages.<system>.workspace-tarballs lists the scoped package; the dev shell provides Node 24 and pnpm 12.
… publishing

- Caller pins the shared release workflow by commit SHA, with ci.yml dispatched on the release PR branch and npm-publish on.
- release.jsonc and a change-intent directory supply what the workflow reads from a caller.
- pnpm 12.9, the version the flake pins, resolves the `rc` tag to 1.0.0-rc.5-ab785fc, an older snapshot build that fails the drizzle-kit snapshot-chain tests; pnpm 12.21 resolved 1.0.0-rc.5.
- Installing the exact version keeps the job on the release candidate the suite was written against.
- The approval gate requires the R0 line verbatim as the first entry under Requirements; no other text changed.
- The approval gate requires the standard R0 wording verbatim; the interim issue-reference sentence is dropped rather than moved, because the issue id and person name must not appear in this public repository.
@kiro-systemf

kiro-systemf Bot commented Nov 20, 2026

Copy link
Copy Markdown

@Mergifyio queue

@mergify

mergify Bot commented Nov 20, 2026

Copy link
Copy Markdown

❌ Left the queue · checks / check fails with this pull request

1 min in the queue, less than a minute of it CI.

So far

  • ✅ Entered the queue Fri 20 Nov, 23:49 · rule default · triggered by the @mergifyio queue command
  • ❌ Checks failed (attempt 1/2) 23:49 · draft #6
  • ❌ Checks failed (attempt 2/2) · draft #7
  • 🚫 Left the queue 23:51 · 34115b1

The failure is in this pull request. It failed tested alone on top of main.

Reason

The merge conditions cannot be satisfied due to failing checks

  • checks / check

Failing checks:

To get back in the queue

  • Push a fix: the pull request is queued again once its queue conditions match.
  • If the failure is a flake, comment @mergifyio queue to queue it again as it is.

Merge conditions not met when it left the queue

  • check-success = checks / check

Times in UTC · dashboard · how the merge queue works

@mergify mergify Bot added dequeued and removed queued labels Nov 20, 2026
@ryanleecode
ryanleecode merged commit 3f93a06 into main Nov 21, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants