From 9b77e6e96a868505bd15165a300bc7dbb167aca7 Mon Sep 17 00:00:00 2001 From: Andrew Fasano Date: Sat, 16 Dec 2023 09:30:32 -0500 Subject: [PATCH] Build and release .deb package --- .github/workflows/build.yml | 16 ++++++++++++---- build.sh | 18 ------------------ debian/source/options | 1 + 3 files changed, 13 insertions(+), 22 deletions(-) delete mode 100755 build.sh create mode 100644 debian/source/options diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2b17ebe..0c0804b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,8 +18,16 @@ jobs: - name: Build run: | - docker run --rm -v $PWD:/app -w /app ubuntu:22.04 /app/build.sh - tar -czvf genext2fs.tar.gz genext2fs + docker run --rm -v $PWD:/app/src -w /app/src ubuntu:22.04 bash -c " \ + sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list; \ + apt-get update && apt-get install -y devscripts build-essential lintian debhelper wget && \ + apt-get build-dep -y genext2fs && \ + wget http://deb.debian.org/debian/pool/main/g/genext2fs/genext2fs_1.5.0.orig.tar.gz && \ + mv genext2fs_1.5.0.orig.tar.gz ../ && \ + debuild -S -us -uc; \ + debuild -us -uc; \ + mv ../genext2fs_*.deb ./genext2fs.deb; \ + " - name: Save package uses: actions/upload-artifact@v3 @@ -46,8 +54,8 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./genext2fs.tar.gz - asset_name: genext2fs.tar.gz + asset_path: ./genext2fs.deb + asset_name: genext2fs.deb asset_content_type: application/gzip - name: Publish release diff --git a/build.sh b/build.sh deleted file mode 100755 index 3f84785..0000000 --- a/build.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -set -eux - -# Add source URIs -sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list -apt-get update - -# Download dependencies -apt build-dep -y genext2fs - -# Configure with libarchive -./autogen.sh - -./configure --enable-libarchive - -# Build -make -j$(nproc) diff --git a/debian/source/options b/debian/source/options new file mode 100644 index 0000000..f76543a --- /dev/null +++ b/debian/source/options @@ -0,0 +1 @@ +extend-diff-ignore = "^\.github/"