From 588a425e2c5e7c67800e7a1d266009d889bc861b Mon Sep 17 00:00:00 2001 From: SW Date: Thu, 10 Sep 2026 15:38:08 +0200 Subject: [PATCH] ci: build .deb manually with dpkg-deb instead of cargo-deb --- .forgejo/workflows/release.yml | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml index 754f814..546c1d7 100644 --- a/.forgejo/workflows/release.yml +++ b/.forgejo/workflows/release.yml @@ -18,7 +18,6 @@ jobs: run: | apt-get update apt-get install -y dpkg-dev git curl openssh-client - cargo install cargo-deb - name: Setup SSH run: | @@ -36,14 +35,30 @@ jobs: working-directory: src run: | VERSION=${{ github.ref_name }} + VER=${VERSION#v} mkdir -p dist - cargo deb - ls -la target/debian/ - file target/debian/*.deb - dpkg-deb -I target/debian/*.deb - cp target/debian/*.deb dist/ + cargo build --release + # .deb package + DEB_DIR="lines_${VER}_amd64" + mkdir -p "${DEB_DIR}/DEBIAN" "${DEB_DIR}/usr/bin" + cp target/release/lines "${DEB_DIR}/usr/bin/lines" + chmod 755 "${DEB_DIR}/usr/bin/lines" + + cat > "${DEB_DIR}/DEBIAN/control" << CONTROL + Package: lines + Version: ${VER} + Section: utils + Priority: optional + Architecture: amd64 + Maintainer: janvete + Description: TUI for running frequently used commands from markdown files + CONTROL + + dpkg-deb --build "${DEB_DIR}" "dist/${DEB_DIR}.deb" + + # Linux tarball STAGING=$(mktemp -d) cp target/release/lines "${STAGING}/lines" tar -czf "dist/lines-${VERSION}-linux-amd64.tar.gz" -C "${STAGING}" lines