Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 35 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ name: CI
on:
push:
branches:
- main
- master
release:
types: [released]
pull_request:
branches:
- main
- master

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
Expand All @@ -21,6 +21,7 @@ jobs:
env:
APP_NAME: http_trace
strategy:
fail-fast: false
matrix:
target:
# Windows
Expand All @@ -37,26 +38,31 @@ jobs:
# Linux
- { displayName: 32-bit Linux,
rustTarget: i686-unknown-linux-gnu,
debArch: i386,
testTarget: '',
runner: 'ubuntu-latest' }

- { displayName: 64-bit Linux,
rustTarget: x86_64-unknown-linux-gnu,
debArch: amd64,
testTarget: linux-x64,
runner: 'ubuntu-latest' }

- { displayName: ARM32 ARMv6 Linux,
rustTarget: arm-unknown-linux-gnueabi,
debArch: armel,
testTarget: linux-arm,
runner: 'ubuntu-latest' }

- { displayName: ARM32 ARMv7 Linux,
rustTarget: armv7-unknown-linux-gnueabihf,
debArch: armhf,
testTarget: linux-arm,
runner: 'ubuntu-latest' }

- { displayName: ARM64 Linux,
rustTarget: aarch64-unknown-linux-gnu,
debArch: arm64,
testTarget: linux-arm64,
runner: 'ubuntu-latest' }

Expand Down Expand Up @@ -137,3 +143,30 @@ jobs:
with:
name: http_trace_server-${{ matrix.target.testTarget }}-${{ matrix.target.rustTarget }}
path: ./publish/${{ matrix.target.testTarget }}

- name: Build .deb package
if: ${{ github.event_name == 'release' && matrix.target.debArch != '' }}
run: |
Comment on lines +147 to +149
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 7a96866 — added debArch to all 5 Linux matrix entries (i386, amd64, armel, armhf, arm64).

mkdir -p dpkg/DEBIAN dpkg/usr/bin
cp ./target/${{ matrix.target.rustTarget }}/release/${{ env.APP_NAME }} dpkg/usr/bin/
chmod 755 dpkg/usr/bin/${{ env.APP_NAME }}
VERSION="${{ github.ref_name }}"
VERSION="${VERSION#v}"
cat > dpkg/DEBIAN/control << EOF
Package: ${{ env.APP_NAME }}
Version: $VERSION
Architecture: ${{ matrix.target.debArch }}
Maintainer: richardsondev
Description: HTTP request tracing tool
EOF
sed -i 's/^ //' dpkg/DEBIAN/control
dpkg-deb --build dpkg ${{ env.APP_NAME }}_${VERSION}_${{ matrix.target.debArch }}.deb

- name: Upload .deb Release Asset
if: ${{ github.event_name == 'release' && matrix.target.debArch != '' }}
env:
GH_TOKEN: ${{ github.token }}
run: |
VERSION="${{ github.ref_name }}"
VERSION="${VERSION#v}"
gh release upload ${{ github.event.release.tag_name }} --clobber ./${{ env.APP_NAME }}_${VERSION}_${{ matrix.target.debArch }}.deb
Loading