Skip to content

fix(rsc): fix "use server" transform for source file without ending new line #2081

fix(rsc): fix "use server" transform for source file without ending new line

fix(rsc): fix "use server" transform for source file without ending new line #2081

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@v5
- name: Install pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
- uses: actions/setup-node@v5
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
run: pnpm dlx [email protected] publish --pnpm --compact './packages/*' './packages/plugin-react-swc/dist'