Skip to content

CI: add ci .deb build step #4

CI: add ci .deb build step

CI: add ci .deb build step #4

Workflow file for this run

name: test-build
on:
pull_request:
push:
concurrency:
group: "${{ github.ref }}"
cancel-in-progress: true
jobs:
build-debian:
strategy:
# Keep other matrix jobs running, even if one fails.
fail-fast: false
matrix:
host_release:
- unstable
# We want a working shell, qemu, python and docker. Specific version should not matter (much).
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Build .deb"
run: |
set -ex
sudo apt-get update
sudo apt-get install -qq -y --no-install-recommends build-essential devscripts equivs
SOURCEDIR="$PWD"
cd /tmp
mk-build-deps -ir -ssudo -t 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y' "$SOURCEDIR"/debian/control
dpkg-source -b "$SOURCEDIR"
dpkg-source -x ./*.dsc builddir
cd builddir
OLD_VERSION=$(dpkg-parsechangelog -SVersion)
SOURCE=$(dpkg-parsechangelog -SSource)
cat > debian/changelog <<EOT
${SOURCE} (${OLD_VERSION}+autobuild${BUILD_NUMBER}) UNRELEASED; urgency=medium
* Automated Build
-- Automated Build <builder@localhost> $(date -R)
EOT
dpkg-buildpackage -b --no-sign
mv ../*deb "$SOURCEDIR"/
- name: Archive built .deb
uses: actions/upload-artifact@v4
with:
name: deb-${{matrix.host_release}}
if-no-files-found: error
path: |
*.deb