1
- name : Build Multi-Platform Binaries and DEB Package
1
+ name : Build DEB and Create Release
2
2
3
3
on :
4
4
push :
7
7
workflow_dispatch :
8
8
9
9
jobs :
10
- build-multi-platform :
11
- name : Build for ${{ matrix.target }}
12
- runs-on : ubuntu-latest
13
- strategy :
14
- matrix :
15
- include :
16
- - target : x86_64-unknown-linux-gnu
17
- os : linux
18
- archive : tar.gz
19
- - target : x86_64-unknown-linux-musl
20
- os : linux
21
- archive : tar.gz
22
- - target : aarch64-unknown-linux-gnu
23
- os : linux
24
- archive : tar.gz
25
- - target : x86_64-apple-darwin
26
- os : macos
27
- archive : zip
28
- - target : aarch64-apple-darwin
29
- os : macos
30
- archive : zip
31
- - target : x86_64-pc-windows-msvc
32
- os : windows
33
- archive : zip
34
-
35
- steps :
36
- - name : Checkout repository
37
- uses : actions/checkout@v4
38
-
39
- - name : Install Rust toolchain
40
- uses : actions-rust-lang/setup-rust-toolchain@v1
41
- with :
42
- toolchain : stable
43
- target : ${{ matrix.target }}
44
- override : true
45
-
46
- - name : Install build dependencies (Linux)
47
- if : matrix.os == 'linux'
48
- run : |
49
- sudo apt-get update
50
- sudo apt-get install -y libssl-dev pkg-config
51
- # Dependencias específicas para targets
52
- if [ "${{ matrix.target }}" = "x86_64-unknown-linux-gnu" ]; then
53
- sudo apt-get install -y gcc-x86-64-linux-gnu
54
- elif [ "${{ matrix.target }}" = "aarch64-unknown-linux-gnu" ]; then
55
- sudo apt-get install -y gcc-aarch64-linux-gnu
56
- fi
57
-
58
- - name : Build binary
59
- run : cargo build --release --target ${{ matrix.target }}
60
-
61
- - name : Strip binary (Linux/MacOS)
62
- if : matrix.os != 'windows'
63
- run : |
64
- strip target/${{ matrix.target }}/release/neutral-ipc${{ matrix.os == 'windows' && '.exe' || '' }}
65
-
66
- - name : Create archive
67
- run : |
68
- cd target/${{ matrix.target }}/release/
69
- if [ "${{ matrix.archive }}" = "tar.gz" ]; then
70
- tar czf ../../../neutral-ipc-${{ matrix.target }}.${{ matrix.archive }} neutral-ipc${{ matrix.os == 'windows' && '.exe' || '' }}
71
- else
72
- zip -r ../../../neutral-ipc-${{ matrix.target }}.${{ matrix.archive }} neutral-ipc${{ matrix.os == 'windows' && '.exe' || '' }}
73
- fi
74
-
75
- - name : Upload artifact
76
- uses : actions/upload-artifact@v4
77
- with :
78
- name : neutral-ipc-${{ matrix.target }}
79
- path : neutral-ipc-${{ matrix.target }}.${{ matrix.archive }}
80
-
81
10
build-deb :
82
11
name : Build DEB Package
83
12
runs-on : ubuntu-latest
84
- needs : build-multi-platform
85
13
permissions :
86
14
contents : write
87
15
@@ -107,51 +35,30 @@ jobs:
107
35
- name : Build DEB package
108
36
run : cargo deb
109
37
110
- - name : Download all binaries
111
- uses : actions/download-artifact@v4
112
- with :
113
- path : artifacts
114
-
115
- - name : List artifacts
116
- run : ls -la artifacts/
38
+ - name : Verify DEB file
39
+ run : |
40
+ echo "Generated DEB package:"
41
+ ls -la target/debian/*.deb
42
+ echo "Build completed successfully"
117
43
118
- - name : Create GitHub Release with all assets
44
+ - name : Create GitHub Release with DEB
119
45
uses : softprops/action-gh-release@v1
120
46
with :
121
- files : |
122
- target/debian/*.deb
123
- artifacts/**/*
47
+ files : target/debian/*.deb
124
48
generate_release_notes : true
125
49
draft : false
126
50
prerelease : false
127
51
body : |
128
- ## 📦 Multi-Platform Release
52
+ ## 📦 Automated DEB Package Release
129
53
130
- This release contains binaries for multiple platforms and a DEB package .
54
+ This release was automatically generated when pushing a git tag .
131
55
132
56
### 📋 Installation Instructions
133
57
134
- **DEB Package (Ubuntu/Debian) :**
58
+ **Install the DEB package :**
135
59
```bash
136
- sudo dpkg -i neutral-ipc *.deb
60
+ sudo dpkg -i *.deb
137
61
sudo apt-get install -f # Fix missing dependencies
138
62
```
139
-
140
- **Binary installation:**
141
- - Extract the archive for your platform
142
- - Copy the binary to a directory in your PATH (e.g., `/usr/local/bin`)
143
- - Make it executable: `chmod +x neutral-ipc`
144
-
145
- ### Supported Platforms:
146
- - Linux (x86_64, aarch64) - GNU and MUSL
147
- - macOS (x86_64, Apple Silicon)
148
- - Windows (x86_64)
149
-
150
- ### Systemd Service (Linux)
151
- After installing the DEB package:
152
- ```bash
153
- sudo systemctl enable neutral-ipc
154
- sudo systemctl start neutral-ipc
155
- ```
156
63
env :
157
64
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments