Skip to content

ci: add preview release action #481

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 20, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/release-continuous.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
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@v4

- name: Install pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0

- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: pnpm

- 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'
Loading