From 12f3b9daddd92c27e438e363b700bf0a44fa70f1 Mon Sep 17 00:00:00 2001 From: bigmistqke Date: Mon, 27 Apr 2026 01:27:18 +0200 Subject: [PATCH] ci: publish previews to pkg.pr.new on push and PR Builds the package and runs `pkg-pr-new publish --compact` so each commit gets an installable URL (https://pkg.pr.new//@) without having to cut a real npm release. Requires the pkg.pr.new GitHub App to be installed on the repo. --- .github/workflows/pkg-pr-new.yml | 33 ++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/pkg-pr-new.yml diff --git a/.github/workflows/pkg-pr-new.yml b/.github/workflows/pkg-pr-new.yml new file mode 100644 index 00000000..fde6babb --- /dev/null +++ b/.github/workflows/pkg-pr-new.yml @@ -0,0 +1,33 @@ +name: Publish to pkg.pr.new + +on: + push: + pull_request: + +jobs: + publish: + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + steps: + - uses: actions/checkout@v4 + + - name: install latest corepack + run: npm install corepack@latest -g + + - run: corepack enable + + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: pnpm + + - name: Install dependencies + run: pnpm install + + - name: Build + run: pnpm build + + - name: Publish preview + run: pnpx pkg-pr-new publish --compact