cr.yml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. name: CR
  2. env:
  3. PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1'
  4. on:
  5. pull_request:
  6. branches: [main]
  7. types: [opened, synchronize, labeled, ready_for_review]
  8. paths-ignore:
  9. - '.github/**'
  10. - '!.github/workflows/cr.yml'
  11. - '__tests__/**'
  12. - 'art/**'
  13. - 'docs/**'
  14. - '*.md'
  15. push:
  16. branches: [main]
  17. paths-ignore:
  18. - '.github/**'
  19. - '!.github/workflows/cr.yml'
  20. - '__tests__/**'
  21. - 'art/**'
  22. - 'docs/**'
  23. - '*.md'
  24. tags-ignore:
  25. - '*'
  26. permissions: {}
  27. concurrency:
  28. group: ${{ github.workflow }}-${{ github.event.number }}
  29. cancel-in-progress: true
  30. jobs:
  31. release:
  32. if: ${{ ((github.event_name == 'pull_request' && !github.event.pull_request.draft && contains(github.event.pull_request.labels.*.name, 'cr-tracked') && !contains(github.event.pull_request.labels.*.name, 'spam') && !contains(github.event.pull_request.labels.*.name, 'invalid')) || (github.event_name == 'push' && !startsWith(github.event.head_commit.message, 'release:'))) && github.repository == 'vuejs/vitepress' }}
  33. runs-on: ubuntu-latest
  34. steps:
  35. - uses: actions/checkout@v4
  36. - uses: pnpm/action-setup@v3
  37. - uses: actions/setup-node@v4
  38. with:
  39. node-version: 22
  40. cache: pnpm
  41. - run: pnpm install
  42. - run: pnpm build
  43. - run: npx pkg-pr-new publish --compact --no-template --pnpm