Skip to content

chore: publish pipeline for the toppynl fork (GitHub Packages) - #2

Merged
Swahjak merged 1 commit into
mainfrom
chore/toppynl-github-packages-release
Aug 15, 2026
Merged

Swahjak merged 1 commit into
mainfrom
chore/toppynl-github-packages-release

Conversation

@Swahjak

@Swahjak Swahjak commented Aug 15, 2026

Copy link
Copy Markdown
Member

Makes this fork releasable, so the fixes we carry are installable instead of only patchable.

Depends on nothing; can merge before or after #1.

What

  • .github/workflows/toppynl-publish.yml
    • version job: on push to main, changesets opens/updates a "Version Packages" PR from .changeset/*.md — the setup already in this repo, not a second release mechanism.
    • publish job: on a toppynl-v* tag (or manual dispatch), install (postinstall builds preprocess/tailwind/core-components/evidence), rescope, pnpm publish the five packages in dependency order to npm.pkg.github.com.
    • Auth is the built-in GITHUB_TOKEN. No secrets to provision.
    • workflow_dispatch defaults to dry_run: true, which only packs tarballs.
    • Upstream's release.yml is guarded on github.repository == 'evidence-dev/evidence' and never fires here, so the two do not collide.
  • scripts/toppynl-rescope.mjs — rewrites the five published package.jsons into @toppynl/evidence*.
  • TOPPYNL.md — what this fork is, what it carries, how to release and consume it.

Why the rename is a script and not a commit

Committing @evidence-dev/* → @toppynl/* would mean renaming every workspace:* cross-reference and every @evidence-dev/... import in the source, and then conflicting with upstream on all of it, forever. This fork should stay a thin layer.

So the rename happens in CI just before publish. Cross-references survive it as npm aliases — the dependency key stays @evidence-dev/sdk and only the value becomes npm:@toppynl/evidence-sdk@<version> — so the published code finds its dependencies under exactly the names its source imports. Packages we don't fork (icons, tailwind, telemetry, universal-sql, preprocess, db-commons, the other datasources) keep workspace:*, which pnpm publish turns into the exact upstream version and resolves from npmjs.

Scope

upstream ours
@evidence-dev/evidence @toppynl/evidence
@evidence-dev/core-components @toppynl/evidence-core-components
@evidence-dev/sdk @toppynl/evidence-sdk
@evidence-dev/component-utilities @toppynl/evidence-component-utilities
@evidence-dev/bigquery @toppynl/evidence-bigquery

Status

Set up, not triggered. The rescope script was run locally against the workspace and produces the expected names, aliases, repository and publishConfig fields; the workflow itself has not published anything. Merging this plus pushing a toppynl-v* tag is the whole release.

Note for whoever flips the switch: consumers must add @toppynl:registry=https://npm.pkg.github.com/ to their .npmrc, and the Evidence CLI resolves datasource/component plugins by package name, so evidence.config.yaml and any connection.yaml naming @evidence-dev/bigquery need updating in the same step. Until then data-reports-project consumes the same fix as a pnpm patch.

Upstream is dormant, so fixes we carry have to be installable. Publish the five
packages we actually consume to GitHub Packages under @toppynl, driven by the
changesets setup that is already in the repo.

The @toppynl rename is applied by scripts/toppynl-rescope.mjs at publish time
rather than committed: committing it would mean renaming every workspace:*
cross-reference and every @evidence-dev import in the source, and conflicting
with upstream on all of it forever. Cross-references survive as npm aliases, so
the dependency key stays @evidence-dev/sdk while its value points at our build.

Auth is the built-in GITHUB_TOKEN - no new secrets. Merging this plus a
toppynl-v* tag is all that is needed to publish.
@Swahjak
Swahjak merged commit 520519f into main Aug 15, 2026
2 of 4 checks passed
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