From 66609a1c80b12de9ec45c9df6673866565ce1b07 Mon Sep 17 00:00:00 2001 From: Santiago Molina Date: Wed, 23 Sep 2026 17:18:42 -0500 Subject: [PATCH] ci: reuse shared quality setup --- .github/workflows/audit.yml | 8 ++--- .github/workflows/build.yml | 48 +++++++++------------------ .github/workflows/changeset-check.yml | 10 ++---- .github/workflows/docs.yml | 9 ++--- .github/workflows/playground.yml | 9 ++--- .github/workflows/prepare-release.yml | 15 ++------- .github/workflows/release.yml | 13 ++------ 7 files changed, 31 insertions(+), 81 deletions(-) diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index 9d249505..55cc2029 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -28,13 +28,9 @@ jobs: steps: - uses: actions/checkout@v6 - - name: Install pnpm - uses: pnpm/action-setup@v5 - - name: Setup Node - uses: actions/setup-node@v6 + - name: Set up pnpm workspace + uses: santi020k/quality/actions/setup-pnpm@eec1701b98bcc0b76d36af288ee78a0369cd84cc # v1 with: node-version: 22.x - cache: 'pnpm' - - run: pnpm install --frozen-lockfile - name: Run pnpm audit run: pnpm audit --audit-level=high --ignore-registry-errors diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index acc04d33..6f0f4017 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,13 +32,11 @@ jobs: - uses: actions/checkout@v6 with: fetch-depth: 0 - - name: Install pnpm - uses: pnpm/action-setup@v5 - - name: Setup Node - uses: actions/setup-node@v6 + - name: Set up pnpm workspace + uses: santi020k/quality/actions/setup-pnpm@eec1701b98bcc0b76d36af288ee78a0369cd84cc # v1 with: node-version: 22.x - cache: 'pnpm' + install: false - name: Turborepo Cache uses: actions/cache@v5 with: @@ -80,13 +78,11 @@ jobs: - uses: actions/checkout@v6 with: fetch-depth: 0 - - name: Install pnpm - uses: pnpm/action-setup@v5 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v6 + - name: Set up pnpm workspace + uses: santi020k/quality/actions/setup-pnpm@eec1701b98bcc0b76d36af288ee78a0369cd84cc # v1 with: node-version: ${{ matrix.node-version }} - cache: "pnpm" + install: false - name: Turborepo Cache uses: actions/cache@v5 with: @@ -139,13 +135,11 @@ jobs: - uses: actions/checkout@v6 with: fetch-depth: 0 - - name: Install pnpm - uses: pnpm/action-setup@v5 - - name: Setup Node - uses: actions/setup-node@v6 + - name: Set up pnpm workspace + uses: santi020k/quality/actions/setup-pnpm@eec1701b98bcc0b76d36af288ee78a0369cd84cc # v1 with: node-version: 22.x - cache: 'pnpm' + install: false - name: Turborepo Cache uses: actions/cache@v5 with: @@ -180,13 +174,11 @@ jobs: steps: - uses: actions/checkout@v6 - - name: Install pnpm - uses: pnpm/action-setup@v5 - - name: Setup Node - uses: actions/setup-node@v6 + - name: Set up pnpm workspace + uses: santi020k/quality/actions/setup-pnpm@eec1701b98bcc0b76d36af288ee78a0369cd84cc # v1 with: node-version: ${{ matrix.node-version }} - cache: pnpm + install: false - name: Setup Bun if: matrix.manager == 'bun' uses: oven-sh/setup-bun@v2 @@ -214,14 +206,10 @@ jobs: - uses: actions/checkout@v6 with: fetch-depth: 0 - - name: Install pnpm - uses: pnpm/action-setup@v5 - - name: Setup Node - uses: actions/setup-node@v6 + - name: Set up pnpm workspace + uses: santi020k/quality/actions/setup-pnpm@eec1701b98bcc0b76d36af288ee78a0369cd84cc # v1 with: node-version: 22.x - cache: 'pnpm' - - run: pnpm install --frozen-lockfile - name: Run final release gate once run: pnpm run release:check @@ -235,14 +223,10 @@ jobs: - uses: actions/checkout@v6 with: fetch-depth: 0 - - name: Install pnpm - uses: pnpm/action-setup@v5 - - name: Setup Node - uses: actions/setup-node@v6 + - name: Set up pnpm workspace + uses: santi020k/quality/actions/setup-pnpm@eec1701b98bcc0b76d36af288ee78a0369cd84cc # v1 with: node-version: 22.x - cache: 'pnpm' - - run: pnpm install --frozen-lockfile - name: Build CLI dependencies (serialised to avoid native-binary contention on Windows) run: pnpm exec turbo run build --filter=@santi020k/eslint-config-basic --concurrency=1 --output-logs=new-only - name: Run CLI and detection tests on Windows diff --git a/.github/workflows/changeset-check.yml b/.github/workflows/changeset-check.yml index a41cdf1a..a2fb36b9 100644 --- a/.github/workflows/changeset-check.yml +++ b/.github/workflows/changeset-check.yml @@ -30,16 +30,10 @@ jobs: with: fetch-depth: 0 - - name: Install pnpm - uses: pnpm/action-setup@v5 - - - name: Setup Node - uses: actions/setup-node@v6 + - name: Set up pnpm workspace + uses: santi020k/quality/actions/setup-pnpm@eec1701b98bcc0b76d36af288ee78a0369cd84cc # v1 with: node-version: 22.x - cache: 'pnpm' - - - run: pnpm install --frozen-lockfile - name: Assert changeset present run: pnpm exec changeset status --since=origin/main diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 3cfb1f39..61e447bf 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -56,14 +56,11 @@ jobs: # workflow_run events expose the triggering commit on a different context key. ref: ${{ github.event.workflow_run.head_sha || github.sha }} - - name: Install pnpm - uses: pnpm/action-setup@v5 - - - name: Setup Node - uses: actions/setup-node@v6 + - name: Set up pnpm workspace + uses: santi020k/quality/actions/setup-pnpm@eec1701b98bcc0b76d36af288ee78a0369cd84cc # v1 with: node-version: 22 - cache: 'pnpm' + install: false - name: Turborepo Cache uses: actions/cache@v5 diff --git a/.github/workflows/playground.yml b/.github/workflows/playground.yml index 7fecac4c..1df49abc 100644 --- a/.github/workflows/playground.yml +++ b/.github/workflows/playground.yml @@ -30,14 +30,11 @@ jobs: with: fetch-depth: 0 - - name: Install pnpm - uses: pnpm/action-setup@v5 - - - name: Setup Node - uses: actions/setup-node@v6 + - name: Set up pnpm workspace + uses: santi020k/quality/actions/setup-pnpm@eec1701b98bcc0b76d36af288ee78a0369cd84cc # v1 with: node-version: 22.x - cache: 'pnpm' + install: false - name: Turborepo Cache uses: actions/cache@v5 diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml index 0fca61a5..8aa87397 100644 --- a/.github/workflows/prepare-release.yml +++ b/.github/workflows/prepare-release.yml @@ -23,21 +23,10 @@ jobs: with: fetch-depth: 0 - - name: Install pnpm - uses: pnpm/action-setup@v5 - - - name: Setup Node.js - uses: actions/setup-node@v6 + - name: Set up pnpm workspace + uses: santi020k/quality/actions/setup-pnpm@eec1701b98bcc0b76d36af288ee78a0369cd84cc # v1 with: node-version: 22.x - cache: pnpm - - - name: Install dependencies - run: pnpm install --frozen-lockfile - - # This action only versions packages and manages changeset-release/main. - # Publishing is deliberately isolated in release.yml and requires that - # release pull request to be merged. - name: Create or update Changesets release pull request uses: changesets/action@v2.1.2 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8c16a935..1afc1ef7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,19 +34,12 @@ jobs: fetch-depth: 0 ref: ${{ github.event.pull_request.merge_commit_sha }} - - name: Install pnpm - uses: pnpm/action-setup@v5 - - - name: Setup Node.js - uses: actions/setup-node@v6 + - name: Set up pnpm workspace + uses: santi020k/quality/actions/setup-pnpm@eec1701b98bcc0b76d36af288ee78a0369cd84cc # v1 with: node-version: 22.x registry-url: "https://registry.npmjs.org" - cache: "pnpm" - - # Node 22 currently bundles npm 10, while npm trusted publishing requires - # npm 11.5.1 or newer. Keep the release runtime on Node 22 and install the - # latest npm 11 release that supports it before invoking Changesets. + install: false - name: Install OIDC-capable npm run: npm install --global npm@11.20.0