Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 27 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
name: build

on: [pull_request, push]
on:
pull_request:
push:
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

permissions:
contents: read
Expand All @@ -10,21 +18,23 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['20', '22', '24']
node-version: ['22', '24']
steps:
- name: Checkout
uses: actions/checkout@v6.0.2

- name: Setup Node.js environment
uses: actions/setup-node@v6.3.0
with:
node-version: ${{ matrix.node-version }}

- name: Setup PNPM
uses: pnpm/action-setup@v6.0.8
with:
version: 11.27.1

- name: Setup Node.js environment
uses: actions/setup-node@v6.3.0
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
cache-dependency-path: pnpm-lock.yaml

- name: Install modules and build projects
run: pnpm install --frozen-lockfile && pnpm run build

Expand Down Expand Up @@ -52,25 +62,24 @@ jobs:

Lint:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['20', '22', '24']
steps:
- name: Checkout
uses: actions/checkout@v6.0.2

- name: Setup Node.js environment
uses: actions/setup-node@v6.3.0
with:
node-version: ${{ matrix.node-version }}

- name: Setup PNPM
uses: pnpm/action-setup@v6.0.8
with:
version: 11.27.1

- name: Install modules and build projects
run: pnpm install --frozen-lockfile && pnpm run build
- name: Setup Node.js environment
uses: actions/setup-node@v6.3.0
with:
node-version: '22'
cache: pnpm
cache-dependency-path: pnpm-lock.yaml

- name: Run tests
- name: Install modules
run: pnpm install --frozen-lockfile

- name: Run lint
run: pnpm run lint
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ pnpm run test:mdx3

### 环境要求

- Node.js >= 20
- Node.js >= 22
- pnpm 11(参见 `packageManager` 字段)

```bash
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"sideEffects": false,
"packageManager": "pnpm@11.27.1",
"engines": {
"node": ">=20"
"node": ">=22"
},
"main": "./dist/lint-md-parser.cjs",
"module": "./dist/lint-md-parser.mjs",
Expand Down
Loading