Skip to content

Commit cfa099a

Browse files
committed
chore: add github files
1 parent b0e9986 commit cfa099a

File tree

8 files changed

+494
-17
lines changed

8 files changed

+494
-17
lines changed

.github/dependabot.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: 'npm'
4+
directory: '/'
5+
schedule:
6+
interval: 'weekly'
7+
open-pull-requests-limit: 10
8+
groups:
9+
development-dependencies:
10+
patterns:
11+
- '@types/*'
12+
- '@typescript-eslint/*'
13+
- 'eslint*'
14+
- 'mocha'
15+
- 'typescript'
16+
17+
- package-ecosystem: 'github-actions'
18+
directory: '/'
19+
schedule:
20+
interval: 'weekly'

.github/workflows/ci.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
test:
11+
strategy:
12+
matrix:
13+
os: [ubuntu-latest] # ubuntu-latest, windows-latest, macos-latest
14+
node-version: [20.x] # 18.x, 20.x
15+
vscode-version: [stable]
16+
17+
runs-on: ${{ matrix.os }}
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Use Node.js ${{ matrix.node-version }}
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
cache: 'npm'
27+
28+
- name: Install dependencies
29+
run: npm ci
30+
31+
- name: Compile TypeScript
32+
run: npm run compile
33+
34+
- name: Run linter
35+
run: npm run lint
36+
37+
- name: Run tests
38+
run: xvfb-run -a npm test
39+
if: runner.os == 'Linux'
40+
41+
- name: Run tests
42+
run: npm test
43+
if: runner.os != 'Linux'
44+
env:
45+
VSCODE_VERSION: ${{ matrix.vscode-version }}
46+
47+
package:
48+
runs-on: ubuntu-latest
49+
needs: test
50+
51+
steps:
52+
- uses: actions/checkout@v4
53+
54+
- name: Use Node.js
55+
uses: actions/setup-node@v4
56+
with:
57+
node-version: 20.x
58+
cache: 'npm'
59+
60+
- name: Install dependencies
61+
run: npm ci
62+
63+
- name: Compile
64+
run: npm run compile
65+
66+
- name: Package Extension
67+
run: |
68+
npm install -g @vscode/vsce
69+
vsce package
70+
71+
- name: Upload VSIX
72+
uses: actions/upload-artifact@v4
73+
with:
74+
name: vscode-extension
75+
path: '*.vsix'

.github/workflows/release.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Create Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
create-release:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Use Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: 20.x
23+
cache: 'npm'
24+
25+
- name: Install dependencies
26+
run: npm ci
27+
28+
- name: Compile
29+
run: npm run compile
30+
31+
- name: Package Extension
32+
run: |
33+
npm install -g @vscode/vsce
34+
vsce package
35+
36+
- name: Find VSIX file
37+
id: find_vsix
38+
run: |
39+
VSIX_FILE=$(ls *.vsix | head -1)
40+
echo "vsix_file=$VSIX_FILE" >> $GITHUB_OUTPUT
41+
42+
- name: Generate changelog
43+
id: changelog
44+
run: |
45+
echo "CHANGELOG<<EOF" >> $GITHUB_OUTPUT
46+
git log --pretty=format:"- %s" $(git describe --tags --abbrev=0 HEAD^)..HEAD >> $GITHUB_OUTPUT
47+
echo "" >> $GITHUB_OUTPUT
48+
echo "EOF" >> $GITHUB_OUTPUT
49+
50+
- name: Create Release
51+
id: create_release
52+
uses: actions/create-release@v1
53+
env:
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55+
with:
56+
tag_name: ${{ github.ref }}
57+
release_name: Release ${{ github.ref }}
58+
body: |
59+
## Changes in this Release
60+
${{ steps.changelog.outputs.CHANGELOG }}
61+
62+
## Installation
63+
64+
Download the `.vsix` file below and install using:
65+
```bash
66+
code --install-extension mcp-server-vscode-*.vsix
67+
```
68+
draft: false
69+
prerelease: false
70+
71+
- name: Upload Release Asset
72+
uses: actions/upload-release-asset@v1
73+
env:
74+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
75+
with:
76+
upload_url: ${{ steps.create_release.outputs.upload_url }}
77+
asset_path: ./${{ steps.find_vsix.outputs.vsix_file }}
78+
asset_name: mcp-server-vscode-${{ github.ref_name }}.vsix
79+
asset_content_type: application/vsix

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 malvex
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)