ci: setup pkg.pr.new (#4062)

pull/4063/head
Divyansh Singh 4 months ago committed by GitHub
parent cccc231f21
commit d78c83bf72
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,16 @@
### Description
<!-- Please insert your description here and provide especially info about the "what" this PR is solving. -->
### Linked Issues
<!-- e.g. fixes #123 -->
### Additional context
<!-- e.g. is there anything you'd like reviewers to focus on? -->
---
> [!TIP]
> The owner of this PR can publish a _preview release_ by commenting `/publish` in this PR.

@ -1,4 +1,4 @@
name: Test
name: CI
env:
NODE_OPTIONS: --max-old-space-size=6144
@ -10,20 +10,26 @@ on:
branches: [main]
pull_request:
branches: [main]
types: [opened, synchronize, reopened]
types: [opened, synchronize, reopened, labeled]
workflow_dispatch:
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true
jobs:
test:
if: github.event.action != 'labeled' || github.event.label.name == 'cr-tracked'
runs-on: ubuntu-latest
strategy:
matrix:
node_version: [18, 20, 22]
exclude:
- node_version: ${{ github.event.action == 'labeled' && 18 }}
- node_version: ${{ github.event.action == 'labeled' && 20 }}
steps:
- name: Checkout
@ -46,3 +52,7 @@ jobs:
- name: Check
run: pnpm check
- name: Publish preview
if: matrix.node_version == 22 && github.event_name == 'pull_request' && github.event.action != 'reopened' && !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')
run: pnpx pkg-pr-new publish

@ -0,0 +1,18 @@
name: Add continuous release label
on:
issue_comment:
types: [created]
permissions:
issues: write
jobs:
cr_comment:
if: github.event.issue.pull_request && (github.event.comment.user.id == github.event.issue.user.id || contains('OWNER,MEMBER,COLLABORATOR', github.event.comment.author_association)) && startsWith(github.event.comment.body, '/publish')
runs-on: ubuntu-latest
steps:
- uses: actions-ecosystem/action-add-labels@v1
with:
labels: cr-tracked

@ -1,6 +1,6 @@
# VitePress 📝💨
[![test](https://github.com/vuejs/vitepress/workflows/Test/badge.svg)](https://github.com/vuejs/vitepress/actions)
[![test](https://github.com/vuejs/vitepress/workflows/CI/badge.svg)](https://github.com/vuejs/vitepress/actions)
[![npm](https://img.shields.io/npm/v/vitepress)](https://www.npmjs.com/package/vitepress)
[![chat](https://img.shields.io/badge/chat-discord-blue?logo=discord)](https://chat.vuejs.org)

Loading…
Cancel
Save