-
Notifications
You must be signed in to change notification settings - Fork 126
53 lines (46 loc) · 1.22 KB
/
nightly-build.yaml
File metadata and controls
53 lines (46 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Publish MCP Package to pkg.pr.new
on:
# 在推送和PR时触发
push:
branches: [main]
pull_request:
branches: [main]
# 也支持手动触发
workflow_dispatch:
jobs:
# 构建和发布到pkg.pr.new
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Enable corepack
run: corepack enable
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
cache-dependency-path: 'mcp/package-lock.json'
- name: Install dependencies
run: |
cd mcp
npm ci
- name: Build package
run: |
cd mcp
npm run build
- name: Test package
run: |
cd mcp
npm run test
env:
TENCENTCLOUD_SECRETID: ${{ secrets.TENCENTCLOUD_SECRETID }}
TENCENTCLOUD_SECRETKEY: ${{ secrets.TENCENTCLOUD_SECRETKEY }}
CLOUDBASE_ENV_ID: ${{ secrets.CLOUDBASE_ENV_ID }}
- name: Publish to pkg.pr.new
run: |
cd mcp
npx pkg-pr-new publish --comment=off