Skip to content

Commit 067e563

Browse files
committed
Initial release jobs
1 parent 80c8d09 commit 067e563

File tree

3 files changed

+70
-13
lines changed

3 files changed

+70
-13
lines changed

.github/workflows/ci.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@ name: ci
22

33
env:
44
R2V: 5.9.8
5+
ZIP_PREFIX: radare2-mcp-
56

67
on:
78
push:
89
branches:
910
- main
11+
tags:
12+
- "[0-9]*"
1013
pull_request:
1114

1215
jobs:
@@ -21,6 +24,17 @@ jobs:
2124
run: ( git clone --depth=1 https://github.com/radareorg/radare2 && cd radare2 && sys/install.sh /usr )
2225
- name: Building radare2-mcp
2326
run: ./configure && make
27+
- name: Create Linux zip archive
28+
if: startsWith(github.ref, 'refs/tags/')
29+
run: |
30+
mkdir -p release
31+
zip -j release/${ZIP_PREFIX}${{ github.ref_name }}-linux-x64.zip r2mcp
32+
- name: Upload Linux binary
33+
if: startsWith(github.ref, 'refs/tags/')
34+
uses: actions/upload-artifact@v4
35+
with:
36+
name: linux-x64-binary
37+
path: release/${ZIP_PREFIX}${{ github.ref_name }}-linux-x64.zip
2438

2539
linux-deb:
2640
runs-on: ubuntu-22.04
@@ -36,6 +50,18 @@ jobs:
3650
sudo dpkg -i *.deb
3751
- name: Building radare2-mcp
3852
run: ./configure && make
53+
- name: Building Debian package
54+
if: startsWith(github.ref, 'refs/tags/')
55+
run: make -C dist/debian
56+
- name: List Debian package files
57+
if: startsWith(github.ref, 'refs/tags/')
58+
run: ls -la dist/debian/*.deb
59+
- name: Upload Debian package
60+
if: startsWith(github.ref, 'refs/tags/')
61+
uses: actions/upload-artifact@v4
62+
with:
63+
name: debian-package
64+
path: dist/debian/*.deb
3965

4066
macos:
4167
runs-on: macos-latest
@@ -56,3 +82,41 @@ jobs:
5682
sys/install.sh
5783
- name: Building radare2-mcp
5884
run: ./configure && make
85+
- name: Create macOS zip archive
86+
if: startsWith(github.ref, 'refs/tags/')
87+
run: |
88+
mkdir -p release
89+
zip -j release/${ZIP_PREFIX}${{ github.ref_name }}-macos-${{ matrix.arch }}.zip r2mcp
90+
- name: Upload macOS binary
91+
if: startsWith(github.ref, 'refs/tags/')
92+
uses: actions/upload-artifact@v4
93+
with:
94+
name: macos-${{ matrix.arch }}-binary
95+
path: release/${ZIP_PREFIX}${{ github.ref_name }}-macos-${{ matrix.arch }}.zip
96+
97+
release:
98+
needs: [r2git, linux-deb, macos]
99+
if: startsWith(github.ref, 'refs/tags/')
100+
runs-on: ubuntu-latest
101+
permissions:
102+
contents: write
103+
steps:
104+
- name: Checkout
105+
uses: actions/checkout@v4
106+
107+
- name: Download all artifacts
108+
uses: actions/download-artifact@v4
109+
with:
110+
path: release-artifacts
111+
112+
- name: List downloaded artifacts
113+
run: find release-artifacts -type f
114+
115+
- name: Create GitHub Release
116+
uses: softprops/action-gh-release@v1
117+
with:
118+
files: |
119+
release-artifacts/linux-x64-binary/*.zip
120+
release-artifacts/debian-package/*.deb
121+
release-artifacts/macos-*-binary/*.zip
122+
generate_release_notes: true

README.md

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ $ r2pm -Uci r2mcp
2929

3030
The `r2mcp` executable will be copied into r2pm's bindir in your home directory. However, this binary is not supposed to be executed directly from the shell; it will only work when launched by the MCP service handler of your language model of choice.
3131

32+
```bash
33+
$ r2pm -r mcp
34+
```
35+
3236
### Using Docker
3337

3438
Alternatively, you can build the Docker image:
@@ -105,19 +109,7 @@ You can now add the following configuration to your VS Code `mcp.json` as explai
105109
```json
106110
{
107111
"servers": {
108-
"radare2-dev": {
109-
"type": "stdio",
110-
"command": "r2mcp",
111-
"args": []
112-
}
113-
},
114-
"inputs": []
115-
}
116-
117-
```json
118-
{
119-
"servers": {
120-
"radare2-dev": {
112+
"r2mcp": {
121113
"type": "stdio",
122114
"command": "r2mcp",
123115
"args": []

dist/debian/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ root:
3232

3333
purge: clean
3434
rm -rf root
35+
docker rmi dockcross/linux-x64
3536

3637
summary:
3738
echo $(VERSION)

0 commit comments

Comments
 (0)