From bd881b39dc7a6fcc80c2696f9d4058c0ff37f2eb Mon Sep 17 00:00:00 2001 From: onmax Date: Sat, 21 Nov 2026 11:26:27 +0100 Subject: [PATCH] ci: publish previews without waiting for tests The publish job waited for the whole CI run. It now builds and checks the packages itself and runs next to the tests. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/pkg-pr-new.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pkg-pr-new.yml b/.github/workflows/pkg-pr-new.yml index b226fbb..0764d76 100644 --- a/.github/workflows/pkg-pr-new.yml +++ b/.github/workflows/pkg-pr-new.yml @@ -27,7 +27,6 @@ jobs: publish: # Do not give fork pull requests a write-capable token while executing their package scripts. if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) - needs: check runs-on: ubuntu-latest permissions: contents: read @@ -42,11 +41,11 @@ jobs: node-version-file: .node-version cache: pnpm - run: pnpm install --frozen-lockfile - - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 - with: - name: dist - path: packages + # Build and check here instead of waiting for the whole CI run, so the + # preview does not wait for the tests. A broken build still publishes nothing. + - run: pnpm build + - run: pnpm check - run: pnpm dlx pkg-pr-new publish './packages/*' --pnpm --packageManager=pnpm env: - # CI already built and checked the package. + # The steps above already built and checked the packages. pnpm_config_ignore_scripts: "true"