-
Notifications
You must be signed in to change notification settings - Fork 2
86 lines (68 loc) · 2.19 KB
/
build-dxt.yml
File metadata and controls
86 lines (68 loc) · 2.19 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Build Desktop Extension (DXT)
on:
push:
tags:
- 'v*'
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install dependencies
run: npm ci
- name: Build project
run: npm run build
- name: Install DXT CLI globally
run: npm install -g @anthropic-ai/dxt
- name: Create DXT package
run: |
# Get version from manifest.json
VERSION=$(node -p "require('./manifest.json').version")
echo "Building DXT for version: $VERSION"
# Create DXT directly in project root (dxt pack includes dependencies)
npx @anthropic-ai/dxt pack
# Rename to include version
mv microcms-document-mcp-server.dxt microcms-document-mcp-server-v${VERSION}.dxt
# Also create a copy without version for consistency
cp microcms-document-mcp-server-v${VERSION}.dxt microcms-document-mcp-server.dxt
- name: Verify DXT creation
run: |
if [ ! -f microcms-document-mcp-server.dxt ]; then
echo "Error: DXT file was failed to be created"
exit 1
fi
ls -la *.dxt
- name: Upload DXT as artifact
uses: actions/upload-artifact@v4
with:
name: microcms-document-mcp-server-dxt
path: |
microcms-document-mcp-server.dxt
microcms-document-mcp-server-v*.dxt
release:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Download DXT artifact
uses: actions/download-artifact@v4
with:
name: microcms-document-mcp-server-dxt
- name: List downloaded files
run: ls -la
- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: |
microcms-document-mcp-server.dxt
microcms-document-mcp-server-v*.dxt
generate_release_notes: true
fail_on_unmatched_files: true