-
-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (62 loc) · 1.67 KB
/
cd.yml
File metadata and controls
66 lines (62 loc) · 1.67 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
54
55
56
57
58
59
60
61
62
63
64
65
66
name: CD
on:
push:
tags: ["v*"]
jobs:
build-mcpb:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: "24"
- run: npm ci
working-directory: mcp-server
- run: npx mcpb pack
working-directory: mcp-server
- uses: actions/upload-artifact@v7
with:
name: mcpb
path: mcp-server/*.mcpb
release:
runs-on: ubuntu-latest
needs: build-mcpb
permissions:
contents: write
steps:
- uses: actions/checkout@v6
- uses: actions/download-artifact@v8
with:
name: mcpb
path: dist/
- name: Create release with .mcpb
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create "${{ github.ref_name }}" dist/*.mcpb \
--title "${{ github.ref_name }}" \
--generate-notes
npm-publish:
runs-on: ubuntu-latest
needs: release
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: "24"
registry-url: "https://registry.npmjs.org"
- run: npm ci
working-directory: mcp-server
- name: Sync version from git tag
working-directory: mcp-server
run: npm version "${GITHUB_REF_NAME#v}" --no-git-tag-version
- name: Publish to npm
working-directory: mcp-server
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
TAG="latest"
if echo "${GITHUB_REF_NAME}" | grep -qE '[-]'; then
TAG="next"
fi
npm publish --access public --tag "$TAG"