fix(rsc): keep client HMR for client modules co-located with rsc-graph code #3531
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Preview Publish | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: [opened, synchronize, labeled] | |
| permissions: {} | |
| jobs: | |
| preview: | |
| if: > | |
| github.repository == 'vitejs/vite-plugin-react' && | |
| (github.event_name == 'push' || | |
| (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'trigger: preview'))) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 | |
| with: | |
| persist-credentials: false | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8 | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 | |
| with: | |
| node-version: lts/* | |
| # disable cache, to avoid cache poisoning (https://docs.zizmor.sh/audits/#cache-poisoning) | |
| package-manager-cache: false | |
| - name: Disallow installation scripts | |
| run: yq '.onlyBuiltDependencies = []' -i pnpm-workspace.yaml | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Build | |
| run: pnpm build | |
| - name: Publish | |
| # zizmor: ignore[use-trusted-publishing] | |
| run: pnpm dlx pkg-pr-new@0.0 publish --pnpm --compact './packages/*' './packages/plugin-react-swc/dist' |