Skip to content

feat(文档服务): 实现真实版本获取并更新发布说明 #6

feat(文档服务): 实现真实版本获取并更新发布说明

feat(文档服务): 实现真实版本获取并更新发布说明 #6

Workflow file for this run

name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
lint-and-test:
name: Lint and Test
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 20, 22]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.11.1
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Type check
run: pnpm run type-check
- name: Lint
run: pnpm run lint
- name: Format check
run: pnpm run format:check
- name: Build
run: pnpm run build
- name: Test
run: pnpm run test
build-and-package:
name: Build and Package
runs-on: ubuntu-latest
needs: lint-and-test
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.11.1
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm run build
- name: Package
run: pnpm pack
- name: Upload package artifact
uses: actions/upload-artifact@v4
with:
name: package
path: '*.tgz'
test-installation:
name: Test Installation
runs-on: ${{ matrix.os }}
needs: build-and-package
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [18, 20]
steps:
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Download package artifact
uses: actions/download-artifact@v4
with:
name: package
- name: Install package globally
run: npm install -g *.tgz
- name: Test CLI
run: varlet-mcp-server --version
- name: Test alternative CLI
run: varlet-mcp --version