Commit daa0c46
Add .deb package generation for Linux releases (#18)
## Summary
Adds `.deb` package generation to the release workflow for all Linux
architectures. As a template repo, this demonstrates how to produce
Debian packages from a Rust CI pipeline.
## Changes
- Added `debArch` field to each Linux target in the build matrix
(`i386`, `amd64`, `armel`, `armhf`, `arm64`)
- Added a `Build .deb package` step that uses `dpkg-deb` to create
Debian packages after the binary is compiled
- Added `Upload .deb Release Asset` step with `--clobber` for idempotent
re-runs
- Uses `env.APP_NAME` consistently for binary paths and package naming
- Binary installs to `/usr/bin/hello_world`
## How it works
On a `release` event, each Linux matrix job creates a `.deb` package
using `dpkg-deb --build`. The package contains the binary at
`/usr/bin/hello_world` and a `DEBIAN/control` file with package name,
version (from the release tag), and architecture. The `.deb` is uploaded
to the GitHub Release alongside existing raw binaries.
## Architectures
| Debian Arch | Rust Target |
|---|---|
| `amd64` | `x86_64-unknown-linux-gnu` |
| `i386` | `i686-unknown-linux-gnu` |
| `arm64` | `aarch64-unknown-linux-gnu` |
| `armhf` | `armv7-unknown-linux-gnueabihf` |
| `armel` | `arm-unknown-linux-gnueabi` |
## Usage
```bash
sudo dpkg -i hello_world_0.02_amd64.deb
hello_world
```
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent c43fbde commit daa0c46
1 file changed
Lines changed: 32 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| 42 | + | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
| 47 | + | |
45 | 48 | | |
46 | 49 | | |
47 | 50 | | |
48 | 51 | | |
| 52 | + | |
49 | 53 | | |
50 | 54 | | |
51 | 55 | | |
52 | 56 | | |
| 57 | + | |
53 | 58 | | |
54 | 59 | | |
55 | 60 | | |
| |||
110 | 115 | | |
111 | 116 | | |
112 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
0 commit comments