From a9c9f11c07a58e8f9f2af570c17292249db1cecf Mon Sep 17 00:00:00 2001 From: Brenley Dueck Date: Fri, 31 Jul 2026 15:15:00 -0500 Subject: [PATCH 1/2] ci: add GitHub Actions workflows (tests, continuous release, release) Ports the workflow setup from solidjs/solid-image: - tests.yml: build, test, and `npm pack --dry-run` on PRs and main - cr.yml: pkg-pr-new preview releases - release.yml: changesets release PR / npm publish, with `id-token: write` so npm trusted publishing can be pointed at this workflow Adds the two things the workflows depend on: an .nvmrc (24.15.0) for `setup-node`'s node-version-file, and a `packageManager` field so `pnpm/action-setup@v4` can resolve the pnpm version. Co-Authored-By: Claude Opus 5 --- .github/workflows/cr.yml | 36 +++++++++++++++++++++++++++++ .github/workflows/release.yml | 43 +++++++++++++++++++++++++++++++++++ .github/workflows/tests.yml | 41 +++++++++++++++++++++++++++++++++ .nvmrc | 1 + package.json | 1 + 5 files changed, 122 insertions(+) create mode 100644 .github/workflows/cr.yml create mode 100644 .github/workflows/release.yml create mode 100644 .github/workflows/tests.yml create mode 100644 .nvmrc diff --git a/.github/workflows/cr.yml b/.github/workflows/cr.yml new file mode 100644 index 0000000..811dabe --- /dev/null +++ b/.github/workflows/cr.yml @@ -0,0 +1,36 @@ +name: ⚡️ Continuous Releases + +on: + push: + branches: + - main + merge_group: + pull_request: + +permissions: + contents: read + +jobs: + cr: + name: Continuous release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v4 + + - name: Use Node.js from .nvmrc + uses: actions/setup-node@v4 + with: + node-version-file: ".nvmrc" + registry-url: "https://registry.npmjs.org" + cache: "pnpm" + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Build + run: pnpm build + + - name: Release package preview + run: pnpm dlx pkg-pr-new@0.0 publish "." diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..49f4079 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,43 @@ +name: Release + +on: + push: + branches: + - main + +concurrency: ${{ github.workflow }}-${{ github.ref }} + +permissions: + contents: write + pull-requests: write + id-token: write + +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v4 + + - name: Use Node.js from .nvmrc + uses: actions/setup-node@v4 + with: + node-version-file: ".nvmrc" + registry-url: "https://registry.npmjs.org" + cache: "pnpm" + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Create release pull request or publish to npm + id: changesets + uses: changesets/action@v1 + with: + publish: pnpm run release + title: "chore: release" + commit: "chore: release" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..b249002 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,41 @@ +name: 🧪 Tests + +on: + workflow_dispatch: + pull_request: + branches: + - main + push: + branches: + - main + +permissions: + contents: read + +jobs: + tests: + name: Build and test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v4 + + - name: Use Node.js from .nvmrc + uses: actions/setup-node@v4 + with: + node-version-file: ".nvmrc" + registry-url: "https://registry.npmjs.org" + cache: "pnpm" + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Build + run: pnpm build + + - name: Test + run: pnpm test + + - name: Verify package + run: npm pack --dry-run diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..5bf4400 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +24.15.0 diff --git a/package.json b/package.json index 7f336f0..917b928 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "solid" ], "sideEffects": false, + "packageManager": "pnpm@11.1.1", "publishConfig": { "access": "public" }, From 8fa321e431198de9991ff9b59996cc878ccefefb Mon Sep 17 00:00:00 2001 From: Brenley Dueck Date: Fri, 31 Jul 2026 15:24:15 -0500 Subject: [PATCH 2/2] ci: drop continuous release workflow for now pkg-pr-new requires its GitHub App to be installed on the repository; without it the /check call 404s with "There is no workflow defined for " and the job fails. Installing the app needs org admin, so pull the workflow out for now and restore it once the app is in place. Co-Authored-By: Claude Opus 5 --- .github/workflows/cr.yml | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 .github/workflows/cr.yml diff --git a/.github/workflows/cr.yml b/.github/workflows/cr.yml deleted file mode 100644 index 811dabe..0000000 --- a/.github/workflows/cr.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: ⚡️ Continuous Releases - -on: - push: - branches: - - main - merge_group: - pull_request: - -permissions: - contents: read - -jobs: - cr: - name: Continuous release - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: pnpm/action-setup@v4 - - - name: Use Node.js from .nvmrc - uses: actions/setup-node@v4 - with: - node-version-file: ".nvmrc" - registry-url: "https://registry.npmjs.org" - cache: "pnpm" - - - name: Install dependencies - run: pnpm install --frozen-lockfile - - - name: Build - run: pnpm build - - - name: Release package preview - run: pnpm dlx pkg-pr-new@0.0 publish "."