@@ -10,58 +10,59 @@ jobs:
1010 runs-on : ubuntu-latest
1111 permissions :
1212 contents : write
13-
13+
1414 steps :
15- - uses : actions/checkout@v4
16-
15+ - name : Checkout code
16+ uses : actions/checkout@v4
17+
1718 - name : Extract version from tag
1819 id : version
1920 run : |
20- echo "version=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT
21- echo "tag=${GITHUB_REF_NAME}" >> $GITHUB_OUTPUT
22-
21+ VERSION=${GITHUB_REF#refs/tags/v}
22+ echo "version=$VERSION" >> $GITHUB_OUTPUT
23+ echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
24+
2325 - name : Set up Python
2426 uses : actions/setup-python@v5
2527 with :
2628 python-version : ' 3.12'
27-
29+
2830 - name : Set up Node.js
2931 uses : actions/setup-node@v4
3032 with :
3133 node-version : ' 20'
32- cache : ' npm'
33-
34+
3435 - name : Install uv
3536 uses : astral-sh/setup-uv@v4
3637 with :
3738 version : " latest"
38-
39- - name : Update versions
39+
40+ - name : Update version in pyproject.toml
4041 run : |
41- # pyproject.toml (simple, line-based)
42- sed -i -E 's/(version\s*=\s*").*(")/\1${{ steps.version.outputs.version }}\2/' pyproject.toml
43- # manifest.json (simple, line-based)
44- sed -i -E 's/("version"\s*:\s*").*(")/\1${{ steps.version.outputs.version }}\2/' manifest.json
45-
46- - name : Bundle Python deps into server/lib
42+ sed -i 's/version = ".*"/version = "${{ steps.version.outputs.version }}"/' pyproject.toml
43+
44+ - name : Update version in manifest.json
4745 run : |
48- mkdir -p server/lib
49- uv pip install . -t server/lib
50-
51- - name : Validate manifest (optional but helpful)
52- run : npx --yes @anthropic-ai/dxt@latest validate manifest.json
53-
54- - name : Pack DXT
46+ sed -i 's/"version": ".*"/"version": "${{ steps.version.outputs.version }}"/' manifest.json
47+
48+ - name : Build project
5549 run : |
56- mkdir -p dist
57- npx --yes @anthropic-ai/dxt@latest pack . dist/mcp-server-ntm-${{ steps.version.outputs.version }}.dxt
58-
50+ # Bundle dependencies
51+ uv sync
52+ uv pip install . --target ./lib/
53+
54+ # Install npm dependencies
55+ npm install @anthropic-ai/dxt
56+
57+ # Build DXT extension
58+ npx dxt pack
59+
5960 - name : Create Release
6061 uses : softprops/action-gh-release@v2
6162 with :
6263 tag_name : ${{ steps.version.outputs.tag }}
6364 name : Release ${{ steps.version.outputs.tag }}
64- files : dist/ mcp-server-ntm-${{ steps.version.outputs.version }} .dxt
65+ files : mcp-server-ntm.dxt
6566 generate_release_notes : true
6667 env :
67- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
68+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments