ci: build .deb manually with dpkg-deb instead of cargo-deb
Some checks failed
Release / release (push) Failing after 34s
Some checks failed
Release / release (push) Failing after 34s
This commit is contained in:
parent
7e577d641c
commit
588a425e2c
1 changed files with 21 additions and 6 deletions
|
|
@ -18,7 +18,6 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y dpkg-dev git curl openssh-client
|
apt-get install -y dpkg-dev git curl openssh-client
|
||||||
cargo install cargo-deb
|
|
||||||
|
|
||||||
- name: Setup SSH
|
- name: Setup SSH
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -36,14 +35,30 @@ jobs:
|
||||||
working-directory: src
|
working-directory: src
|
||||||
run: |
|
run: |
|
||||||
VERSION=${{ github.ref_name }}
|
VERSION=${{ github.ref_name }}
|
||||||
|
VER=${VERSION#v}
|
||||||
mkdir -p dist
|
mkdir -p dist
|
||||||
|
|
||||||
cargo deb
|
cargo build --release
|
||||||
ls -la target/debian/
|
|
||||||
file target/debian/*.deb
|
|
||||||
dpkg-deb -I target/debian/*.deb
|
|
||||||
cp target/debian/*.deb dist/
|
|
||||||
|
|
||||||
|
# .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 <jan.vete@example.com>
|
||||||
|
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)
|
STAGING=$(mktemp -d)
|
||||||
cp target/release/lines "${STAGING}/lines"
|
cp target/release/lines "${STAGING}/lines"
|
||||||
tar -czf "dist/lines-${VERSION}-linux-amd64.tar.gz" -C "${STAGING}" lines
|
tar -czf "dist/lines-${VERSION}-linux-amd64.tar.gz" -C "${STAGING}" lines
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue