Skip to content

ci: publish pkg.pr.new previews on every PR / push#7

Merged
jagguji merged 2 commits into
mainfrom
feat-pkg-pr-new-previews
Jun 9, 2026
Merged

ci: publish pkg.pr.new previews on every PR / push#7
jagguji merged 2 commits into
mainfrom
feat-pkg-pr-new-previews

Conversation

@jagguji

@jagguji jagguji commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Adds per-PR/commit preview builds of the tool itself via pkg.pr.new, mirroring blend's #1358 but adapted for this repo (npm, single package, no build step).

What it does

A new preview job in ci.yml (gated on the smoke + golden tests passing) runs npx pkg-pr-new publish on every PR and every push to main. The bot posts a sticky PR comment with an install URL:

npm i https://pkg.pr.new/@juspay/rescript-bindgen@<sha>

Why

Right now, testing an unreleased fix means using local source or npm link. With previews, anyone can npm i the exact build of a PR/commit into another project and run npx rescript-bindgen … — no clone, no link, no waiting for a real release. (This is exactly the gap we hit testing the @types/react fix.)

Previews live on pkg.pr.new's domain (not npmjs.org), are commit-pinned and ephemeral, and don't touch latest/beta.

Setup

The pkg-pr-new GitHub App is already installed on the repo (no token to manage). PUBLISHING.md documents the preview flow.

Notes

jagguji added 2 commits June 9, 2026 19:34
Adds a `preview` job (gated on tests passing) that publishes a commit-SHA-pinned
preview of the tool via pkg.pr.new and posts a sticky PR comment with an install
URL: `npm i https://pkg.pr.new/@juspay/rescript-bindgen@<sha>`. Lets anyone test the
exact build of a PR/commit in another project without a real release or npm link.
Requires the pkg-pr-new GitHub App on the repo (installed). PUBLISHING.md documents it.
Adds a "Preview builds" section under Install — how to `npm i` a commit-pinned
preview (https://pkg.pr.new/@juspay/rescript-bindgen@<sha>) to test an unreleased
change, and that previews don't affect the normal latest/beta install.
@pkg-pr-new

pkg-pr-new Bot commented Jun 9, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@juspay/rescript-bindgen@7

commit: 023e0f1

@jagguji jagguji merged commit d5b3b72 into main Jun 9, 2026
7 checks passed
@jagguji jagguji deleted the feat-pkg-pr-new-previews branch June 9, 2026 14:13
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