Skip to content

Commit 557881c

Browse files
committed
Various
- Added icon - Added GitHub action to build dxt file and release - Updated manifest and pyproject - Better error handling - Code clean-up
1 parent a4f0bf9 commit 557881c

File tree

7 files changed

+230
-74
lines changed

7 files changed

+230
-74
lines changed

.github/workflows/release.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Build and Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
build-and-release:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Extract version from tag
19+
id: version
20+
run: |
21+
VERSION=${GITHUB_REF#refs/tags/v}
22+
echo "version=$VERSION" >> $GITHUB_OUTPUT
23+
echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
24+
25+
- name: Set up Python
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: '3.12'
29+
30+
- name: Set up Node.js
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version: '20'
34+
35+
- name: Install uv
36+
uses: astral-sh/setup-uv@v4
37+
with:
38+
version: "latest"
39+
40+
- name: Update version in pyproject.toml
41+
run: |
42+
sed -i 's/version = ".*"/version = "${{ steps.version.outputs.version }}"/' pyproject.toml
43+
44+
- name: Update version in manifest.json
45+
run: |
46+
sed -i 's/"version": ".*"/"version": "${{ steps.version.outputs.version }}"/' manifest.json
47+
48+
- name: Build project
49+
run: |
50+
# Bundle dependencies
51+
uv sync
52+
uv pip install . --target ./lib/
53+
54+
# Build DXT extension
55+
npx dxt pack
56+
57+
- name: Create Release
58+
uses: softprops/action-gh-release@v2
59+
with:
60+
tag_name: ${{ steps.version.outputs.tag }}
61+
name: Release ${{ steps.version.outputs.tag }}
62+
files: mcp-server-ntm.dxt
63+
generate_release_notes: true
64+
env:
65+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

assets/icon.png

2.68 KB
Loading

build.ps1

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Bundle the project dependencies
2+
Remove-Item -Path ./lib/ -Recurse -ErrorAction Ignore
3+
& uv sync
4+
& uv pip install . --target ./lib/
5+
6+
# Build the DXT extension
7+
& npx dxt pack

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"dxt_version": "0.1",
33
"name": "mcp-server-ntm",
44
"display_name": "Netwrix Threat Manager MCP Server",
5-
"version": "0.0.1",
5+
"version": "0.1.0",
66
"description": "Monitor and assess threats.",
77
"author": {
88
"name": "Netwrix Corporation"

0 commit comments

Comments
 (0)