From 5530e34b3ca76c91fbf335406e571aa3d536db6a Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Thu, 3 Sep 2026 11:54:14 +0100 Subject: [PATCH] chore: update for merge groups + pkg.pr.new --- .github/workflows/ci.yml | 1 + .github/workflows/preview.yml | 37 ++++++++++++++++++++++++++++++++ .github/workflows/provenance.yml | 3 ++- package.json | 3 ++- pnpm-lock.yaml | 9 ++++++++ 5 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/preview.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9e18a8b..e0dd4dc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,7 @@ on: push: branches: - main + merge_group: permissions: contents: read diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml new file mode 100644 index 0000000..b83a92e --- /dev/null +++ b/.github/workflows/preview.yml @@ -0,0 +1,37 @@ +name: preview + +on: + pull_request: + branches: + - main + push: + branches: + - main + merge_group: + +permissions: + contents: read + +jobs: + publish: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + pull-requests: write + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 + - run: corepack enable + - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7 + with: + node-version: lts/* + cache: pnpm + + - name: 📦 Install dependencies + run: pnpm install + + - name: 🛠 Build project + run: pnpm build + + - name: 🚀 Publish preview release + run: pnpm pkg-pr-new publish --compact --pnpm diff --git a/.github/workflows/provenance.yml b/.github/workflows/provenance.yml index db16110..bb2d93c 100644 --- a/.github/workflows/provenance.yml +++ b/.github/workflows/provenance.yml @@ -1,4 +1,4 @@ -name: ci +name: provenance on: push: @@ -7,6 +7,7 @@ on: pull_request: branches: - main + merge_group: permissions: contents: read jobs: diff --git a/package.json b/package.json index 4850817..e62efe2 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "lint": "eslint . --fix", "prepare": "simple-git-hooks", "prepack": "pnpm lint && pnpm test && pnpm build", - "test": "pnpm test:unit && pnpm test:types", + "test": "pnpm test:unit && pnpm test:types && pnpm test:knip", "test:unit": "vitest", "test:knip": "knip", "test:versions": "installed-check -d --no-workspaces", @@ -47,6 +47,7 @@ "installed-check": "11.0.0", "knip": "6.33.0", "nano-staged": "1.0.2", + "pkg-pr-new": "0.0.88", "simple-git-hooks": "2.14.0", "tsdown": "0.22.14", "typescript": "6.0.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e929936..3e843b7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -29,6 +29,9 @@ importers: nano-staged: specifier: 1.0.2 version: 1.0.2 + pkg-pr-new: + specifier: 0.0.88 + version: 0.0.88 simple-git-hooks: specifier: 2.14.0 version: 2.14.0 @@ -2130,6 +2133,10 @@ packages: resolution: {integrity: sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==} engines: {node: '>=12'} + pkg-pr-new@0.0.88: + resolution: {integrity: sha512-Xc6PMJ2gher0WZP+rtjefFk26hIb7V1PTLL30bmy1Z2vsRmSvqiss7Ag1XUdyplTGYzIlFNJp4L3vMNmK44N6g==} + hasBin: true + pkg-types@1.3.1: resolution: {integrity: sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==} @@ -4726,6 +4733,8 @@ snapshots: picomatch@4.0.7: {} + pkg-pr-new@0.0.88: {} + pkg-types@1.3.1: dependencies: confbox: 0.1.8 -- knotmirror 0.0.1