feat:增加自动构建脚本
This commit is contained in:
parent
66e748bf01
commit
52074d1ea2
60
.github/workflows/ci.yaml
vendored
Normal file
60
.github/workflows/ci.yaml
vendored
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
name: Build & Test VSCode Extension
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
release:
|
||||||
|
types:
|
||||||
|
- published
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '22.x'
|
||||||
|
cache: 'npm'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Build monorepo
|
||||||
|
run: npm run build
|
||||||
|
|
||||||
|
- name: Compile TypeScript
|
||||||
|
run: npx tsc
|
||||||
|
|
||||||
|
- name: Package VSIX
|
||||||
|
run: npx vsce package --out dist/openmcp.vsix
|
||||||
|
|
||||||
|
- name: Upload VSIX
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: openmcp-${{ matrix.os }}
|
||||||
|
path: dist/openmcp.vsix
|
||||||
|
|
||||||
|
# test:
|
||||||
|
# needs: build
|
||||||
|
# runs-on: ubuntu-latest
|
||||||
|
# steps:
|
||||||
|
# - name: Checkout code
|
||||||
|
# uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# - name: Setup Node.js
|
||||||
|
# uses: actions/setup-node@v4
|
||||||
|
# with:
|
||||||
|
# node-version: '22.x'
|
||||||
|
# cache: 'npm'
|
||||||
|
|
||||||
|
# - name: Install test dependencies
|
||||||
|
# run: npm install && npm run test
|
Loading…
x
Reference in New Issue
Block a user