Skip to content

Commit 017ed56

Browse files
authored
ci: split continuous release workflow to separate file (vuejs#4065)
1 parent 445829a commit 017ed56

File tree

4 files changed

+77
-60
lines changed

4 files changed

+77
-60
lines changed

.github/workflows/ci.yml

-59
This file was deleted.

.github/workflows/cr.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: CR
2+
3+
env:
4+
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1'
5+
6+
on:
7+
pull_request:
8+
branches: [main]
9+
types: [opened, synchronize, labeled, ready_for_review]
10+
11+
permissions: {}
12+
13+
jobs:
14+
release:
15+
if: ${{ !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') }}
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: pnpm/action-setup@v3
21+
- uses: actions/setup-node@v4
22+
with:
23+
node-version: 22
24+
cache: pnpm
25+
- run: pnpm install
26+
- run: pnpm build
27+
- run: npx pkg-pr-new publish --compact --no-template --pnpm

.github/workflows/test.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Test
2+
3+
env:
4+
NODE_OPTIONS: --max-old-space-size=6144
5+
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1'
6+
VITEST_SEGFAULT_RETRY: 3
7+
8+
on:
9+
push:
10+
branches: [main]
11+
pull_request:
12+
branches: [main]
13+
workflow_dispatch:
14+
15+
permissions: {}
16+
17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
19+
cancel-in-progress: true
20+
21+
jobs:
22+
test:
23+
runs-on: ubuntu-latest
24+
25+
strategy:
26+
matrix:
27+
node_version: [18, 20, 22]
28+
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v4
32+
33+
- name: Install pnpm
34+
uses: pnpm/action-setup@v3
35+
36+
- name: Set node version to ${{ matrix.node_version }}
37+
uses: actions/setup-node@v4
38+
with:
39+
node-version: ${{ matrix.node_version }}
40+
cache: pnpm
41+
42+
- name: Install deps
43+
run: pnpm install
44+
45+
- name: Install Playwright
46+
run: pnpm playwright install chromium
47+
48+
- name: Check
49+
run: pnpm check

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# VitePress 📝💨
22

3-
[![test](https://github.com/vuejs/vitepress/workflows/CI/badge.svg)](https://github.com/vuejs/vitepress/actions)
3+
[![test](https://github.com/vuejs/vitepress/workflows/Test/badge.svg)](https://github.com/vuejs/vitepress/actions)
44
[![npm](https://img.shields.io/npm/v/vitepress)](https://www.npmjs.com/package/vitepress)
55
[![chat](https://img.shields.io/badge/chat-discord-blue?logo=discord)](https://chat.vuejs.org)
66

0 commit comments

Comments
 (0)