name: Plugin Runtime Size on: pull_request: paths: - 'packages/im/**' - 'pnpm-lock.yaml' - '.github/workflows/plugin-runtime-size.yml' push: branches: - main paths: - 'packages/im/**' - 'pnpm-lock.yaml' - '.github/workflows/plugin-runtime-size.yml' merge_group: permissions: contents: read concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: plan: permissions: contents: read actions: read packages: read runs-on: ubuntu-latest timeout-minutes: 10 outputs: full: ${{ steps.plan.outputs.full }} steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v4.2.2 with: persist-credentials: false - uses: ./.github/actions/plan-validation id: plan with: workflow: plugin-runtime-size.yml npm-token: ${{ secrets.PERSONAL_TOKEN }} production-install: needs: plan if: needs.plan.outputs.full == 'true' permissions: contents: read packages: read runs-on: ubuntu-latest timeout-minutes: 10 env: NPM_TOKEN: '' steps: - name: setup pnpm uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v4 with: version: 9.0.2 - name: checkout repository uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v4.2.2 with: persist-credentials: false - name: setup node.js uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: node-version: 24 - name: restore pnpm store uses: ./.github/actions/restore-pnpm-store # Preserve the existing package credential mapping for cross-organization @icqqjs access. # Do not materialize credentials in .npmrc or expose them to lifecycle scripts. - name: install dependencies run: pnpm install --frozen-lockfile --ignore-scripts --ignore-pnpmfile env: NPM_TOKEN: ${{ secrets.PERSONAL_TOKEN }} - name: run dependency lifecycle scripts without registry credentials run: pnpm rebuild - name: enforce production install budget run: pnpm --filter @zhin.js/runtime check:size