-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (48 loc) · 1.6 KB
/
Copy pathrelease.yml
File metadata and controls
51 lines (48 loc) · 1.6 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
name: release
on:
push:
tags:
- "v*"
workflow_dispatch:
permissions:
contents: read
id-token: write
jobs:
publish:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: pnpm
registry-url: "https://registry.npmjs.org"
- run: pnpm install --frozen-lockfile
- run: pnpm sync-docs
- run: pnpm -r run build
- run: pnpm -r run typecheck
- run: pnpm -r run test
- name: Publish mcp-core if not already on npm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
VERSION=$(node -p "require('./packages/mcp-core/package.json').version")
if npm view @swarmclawai/mcp-core@${VERSION} version >/dev/null 2>&1; then
echo "@swarmclawai/mcp-core@${VERSION} already published — skipping"
else
pnpm --filter @swarmclawai/mcp-core publish --access public --no-git-checks
fi
- name: Publish mcp-gateway if not already on npm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
VERSION=$(node -p "require('./packages/mcp-gateway/package.json').version")
if npm view @swarmclawai/mcp-gateway@${VERSION} version >/dev/null 2>&1; then
echo "@swarmclawai/mcp-gateway@${VERSION} already published — skipping"
else
pnpm --filter @swarmclawai/mcp-gateway publish --access public --no-git-checks
fi