Skip to content

Commit f53d739

Browse files
committed
ci: add debian package builds to releases
1 parent a36993a commit f53d739

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/release.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,45 @@ jobs:
5555
cd dist && zip -r "../${binary}.zip" "${binary}" && cd ..
5656
done
5757
58+
- name: Build Debian packages
59+
run: |
60+
VERSION="0.1.0"
61+
62+
declare -A arch_map=(
63+
["sif-linux-amd64"]="amd64"
64+
["sif-linux-386"]="i386"
65+
["sif-linux-arm64"]="arm64"
66+
)
67+
68+
for binary in sif-linux-amd64 sif-linux-386 sif-linux-arm64; do
69+
arch="${arch_map[$binary]}"
70+
pkg_dir="sif_${VERSION}_${arch}"
71+
72+
mkdir -p "${pkg_dir}/DEBIAN"
73+
mkdir -p "${pkg_dir}/usr/bin"
74+
mkdir -p "${pkg_dir}/usr/share/sif/modules"
75+
76+
cp "${binary}" "${pkg_dir}/usr/bin/sif"
77+
chmod 755 "${pkg_dir}/usr/bin/sif"
78+
cp -r modules/* "${pkg_dir}/usr/share/sif/modules/"
79+
80+
cat > "${pkg_dir}/DEBIAN/control" << EOF
81+
Package: sif
82+
Version: ${VERSION}
83+
Section: security
84+
Priority: optional
85+
Architecture: ${arch}
86+
Maintainer: Celeste Hickenlooper <celeste@router.sex>
87+
Homepage: https://github.com/vmfunc/sif
88+
Description: Modular pentesting toolkit
89+
sif is a fast, concurrent, and extensible pentesting toolkit written in Go.
90+
It supports multiple scan types including directory fuzzing, subdomain
91+
enumeration, port scanning, and vulnerability detection.
92+
EOF
93+
94+
dpkg-deb --build "${pkg_dir}"
95+
done
96+
5897
- name: Set release version
5998
run: echo "RELEASE_VERSION=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
6099

@@ -77,6 +116,9 @@ jobs:
77116
- Linux (64-bit): `sif-linux-amd64.tar.gz`
78117
- Linux (32-bit): `sif-linux-386.tar.gz`
79118
- Linux (64-bit ARM): `sif-linux-arm64.tar.gz`
119+
- Debian/Ubuntu (64-bit): `sif_0.1.0_amd64.deb`
120+
- Debian/Ubuntu (32-bit): `sif_0.1.0_i386.deb`
121+
- Debian/Ubuntu (64-bit ARM): `sif_0.1.0_arm64.deb`
80122
81123
## Installation
82124
@@ -97,5 +139,8 @@ jobs:
97139
sif-linux-amd64.tar.gz
98140
sif-linux-386.tar.gz
99141
sif-linux-arm64.tar.gz
142+
sif_0.1.0_amd64.deb
143+
sif_0.1.0_i386.deb
144+
sif_0.1.0_arm64.deb
100145
env:
101146
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)