Skip to content

Commit 7852cf9

Browse files
committed
Add release.yml for precompiled binaries
Added release.yml to release binaries for ubuntu, macos, and windows.
1 parent d5b708e commit 7852cf9

File tree

2 files changed

+85
-1
lines changed

2 files changed

+85
-1
lines changed

.github/workflows/release.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
11+
jobs:
12+
build:
13+
name: Build
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
matrix:
17+
include:
18+
- os: ubuntu-latest
19+
name: linux-x86_64
20+
artifact_name: cln-mcp-linux-x86_64
21+
artifact_pattern: "cln-mcp-linux-x86_64.tar.gz"
22+
- os: macos-latest
23+
name: macos-x86_64
24+
artifact_name: cln-mcp-macos-x86_64
25+
artifact_pattern: "cln-mcp-macos-x86_64.tar.gz"
26+
- os: windows-latest
27+
name: windows-x86_64
28+
artifact_name: cln-mcp-windows-x86_64.exe
29+
artifact_pattern: "cln-mcp-windows-x86_64.zip"
30+
31+
32+
steps:
33+
- name: Checkout
34+
uses: actions/checkout@v4
35+
36+
- name: Install Rust stable toolchain
37+
run: |
38+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain stable
39+
rustup override set stable
40+
41+
- name: Install protoc
42+
if: runner.os == 'Linux'
43+
run: |
44+
sudo apt-get update
45+
sudo apt-get install -y protobuf-compiler
46+
47+
- name: Install protoc
48+
if: runner.os == 'macOS'
49+
run: |
50+
brew install protobuf
51+
52+
- name: Install protoc
53+
if: runner.os == 'Windows'
54+
run: |
55+
choco install protoc
56+
57+
- name: Build
58+
run: |
59+
cargo build --release
60+
61+
- name: Package Windows
62+
if: runner.os == 'Windows'
63+
run: |
64+
cd target/release
65+
7z a -tzip ../../${{ matrix.artifact_pattern }} cln-mcp.exe
66+
cd ../..
67+
68+
- name: Package Unix
69+
if: runner.os != 'Windows'
70+
run: |
71+
cd target/release
72+
tar -czf ../../${{ matrix.artifact_pattern }} cln-mcp
73+
cd ../..
74+
75+
- name: Upload artifacts
76+
uses: actions/upload-artifact@v4
77+
with:
78+
name: ${{ matrix.artifact_name }}
79+
path: ${{ matrix.artifact_pattern }}
80+
if-no-files-found: error

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
/target/
22
cargo.lock
3-
/certs/
3+
/certs/
4+
5+
# Release artifacts
6+
*.tar.gz
7+
*.zip

0 commit comments

Comments
 (0)