Skip to content

chore: pkg.pr.new preview with label and comment #2

chore: pkg.pr.new preview with label and comment

chore: pkg.pr.new preview with label and comment #2

Workflow file for this run

name: Preview release
env:
# install playwright binary manually (because pnpm only runs install script once)
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
permissions:
pull-requests: write
on:
push:
branches:
- main
pull_request:
types: [labeled]
jobs:
preview:
if: >
github.repository == 'vitejs/vite' &&
(github.event_name == 'push' ||
(github.event.issue.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/[email protected]
- name: Install dependencies
run: pnpm install
- name: Build
working-directory: ./packages/vite
run: pnpm build
- run: pnpm dlx [email protected] publish --compact --pnpm ./packages/vite
- if: github.event_name != 'push'
run: |
gh issue edit ${{ github.event.issue.number }} --remove-label "trigger: preview" --repo ${{ github.repository }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}