Add .deb package generation for Linux releases#38
Conversation
There was a problem hiding this comment.
Pull request overview
Adds Debian package generation to the release workflow so Linux builds can also be published as .deb assets alongside the existing binaries.
Changes:
- Introduces a new “Build .deb package” step that assembles a minimal Debian package and runs
dpkg-deb --build. - Uploads the generated
.debas a GitHub Release asset.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/release.yml | Adds .deb packaging + upload steps to the release workflow. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 4
| - name: Build .deb package | ||
| if: ${{ github.event_name == 'release' && matrix.target.debArch != '' }} | ||
| run: | |
There was a problem hiding this comment.
Fixed in 7a96866 — added debArch to all 5 Linux matrix entries (i386, amd64, armel, armhf, arm64).
| mkdir -p dpkg/DEBIAN dpkg/usr/local/bin | ||
| cp ./target/${{ matrix.target.rustTarget }}/release/http_trace dpkg/usr/local/bin/ | ||
| chmod 755 dpkg/usr/local/bin/http_trace |
There was a problem hiding this comment.
Fixed in 7a96866 — changed to /usr/bin per Debian FHS policy.
| cp ./target/${{ matrix.target.rustTarget }}/release/http_trace dpkg/usr/local/bin/ | ||
| chmod 755 dpkg/usr/local/bin/http_trace |
There was a problem hiding this comment.
Fixed in 7a96866 — all .deb step paths now use env.APP_NAME instead of hardcoded binary name.
| run: | | ||
| VERSION="${{ github.ref_name }}" | ||
| VERSION="${VERSION#v}" | ||
| gh release upload ${{ github.event.release.tag_name }} ./http_trace_${VERSION}_${{ matrix.target.debArch }}.deb |
There was a problem hiding this comment.
Fixed in 7a96866 — added --clobber to gh release upload for idempotent re-runs.
🧪 .deb Package Test ResultsTest environment: podman + debian:bookworm-slim (amd64)
Package structure is valid. Binary execution requires glibc 2.38+ (built on |
Adds debArch to Linux matrix entries and a dpkg-deb build step that creates .deb packages for each Linux architecture on release. Packages install the binary to /usr/local/bin/. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Install to /usr/bin instead of /usr/local/bin (Debian FHS policy) - Add --clobber to gh release upload for idempotent re-runs - Use env.APP_NAME where defined for consistency - Add missing debArch to matrix entries (http_trace) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The default branch is master, but the workflow referenced main, preventing CI from running on PRs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Prevents Linux builds from being cancelled when a Windows build fails (e.g., due to missing nasm). Each platform builds independently. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
fa5bb52 to
cdd4db9
Compare
Summary
Adds
.debpackage generation to the release workflow for all Linux architectures. Also fixes the CI trigger branch and addsfail-fast: false.Changes
debArchfield to each Linux target in the build matrix (i386,amd64,armel,armhf,arm64)Build .deb packagestep that usesdpkg-debto create Debian packages after the binary is compiledUpload .deb Release Assetstep with--clobberfor idempotent re-runsmaintomaster(matching actual default branch)fail-fast: falseto strategy so Linux builds complete even if a Windows build failsenv.APP_NAMEconsistently for binary paths and package naming/usr/bin/http_traceHow it works
On a
releaseevent, each Linux matrix job creates a.debpackage usingdpkg-deb --build. The package contains the binary at/usr/bin/http_traceand aDEBIAN/controlfile with package name, version (from the release tag), and architecture. The.debis uploaded to the GitHub Release alongside existing raw binaries. The .NET test server build steps are unaffected.Architectures
amd64x86_64-unknown-linux-gnui386i686-unknown-linux-gnuarm64aarch64-unknown-linux-gnuarmhfarmv7-unknown-linux-gnueabihfarmelarm-unknown-linux-gnueabiUsage