chore: fix preview-release.yml (#18504)

This commit is contained in:
Hiroshi Ogawa 2024-10-29 15:09:42 +09:00 committed by GitHub
parent ddd5c5d00f
commit 2c10f9a452
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -12,14 +12,14 @@ on:
branches:
- main
pull_request:
types: [labeled]
types: [opened, synchronize, 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')))
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'trigger: preview')))
runs-on: ubuntu-latest
steps:
- name: Checkout code
@ -36,9 +36,3 @@ jobs:
run: pnpm build
- run: pnpm dlx pkg-pr-new@0.0 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 }}