This is a GitHub Action that will
build a Debian package
(.deb
file) for various Debian or Ubuntu versions.
on: [push]
jobs:
build-deb:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: legoktm/gh-action-build-deb@debian-buster
id: build-debian-buster
with:
args: --nosign
- uses: actions/upload-artifact@v1
with:
name: Packages for buster
path: output
This Action will build both a source package and then a binary package and place
them in a output/
directory.
Each Debian/Ubuntu version to build for has its own branch. The following are currently supported:
-
debian-buster
aka Debian 10 -
debian-bullseye
aka Debian 11 -
debian-bookworm
aka Debian 12 -
debian-trixie
aka Debian 13 -
debian-unstable
aka Debian Sid -
ubuntu-bionic
aka Ubuntu 18.04 LTS -
ubuntu-eoan
aka Ubuntu 19.10 -
ubuntu-focal
aka Ubuntu 20.04 LTS -
ubuntu-groovy
aka Ubuntu 20.10 -
ubuntu-hirsute
aka Ubuntu 21.04 -
ubuntu-impish
aka Ubuntu 21.10 -
ubuntu-jammy
aka Ubuntu 22.04 -
ubuntu-kinetic
-
ubuntu-lunar
-
ubuntu-mantic
-
ubuntu-noble
args
: arguments to pass todpkg-buildpackage
sources
: repositories to add to/etc/apt/sources.list
ppa
: Name of Ubuntu PPA to add (no ppa: prefix)
- gh-action-auto-dch automatically adds a changelog entry based on the git information and distro.
- gh-action-dput uploads built packages to a PPA or repository.
A multi-OS version package building matrix might look like:
on: [push, pull_request]
jobs:
build-deb:
runs-on: ubuntu-latest
strategy:
matrix:
distro: [ubuntu-focal, ubuntu-eoan, ubuntu-bionic, debian-buster]
steps:
- uses: actions/checkout@v2
- uses: legoktm/gh-action-build-deb@ubuntu-focal
if: matrix.distro == 'ubuntu-focal'
name: Build package for ubuntu-focal
id: build-ubuntu-focal
with:
args: --no-sign
- uses: legoktm/gh-action-build-deb@ubuntu-eoan
if: matrix.distro == 'ubuntu-eoan'
name: Build package for ubuntu-eoan
id: build-ubuntu-eoan
with:
args: --no-sign
- uses: legoktm/gh-action-build-deb@ubuntu-bionic
if: matrix.distro == 'ubuntu-bionic'
name: Build package for ubuntu-bionic
id: build-ubuntu-bionic
with:
args: --no-sign
- uses: legoktm/gh-action-build-deb@debian-buster
if: matrix.distro == 'debian-buster'
name: Build package for debian-buster
id: build-debian-buster
with:
args: --no-sign
- uses: actions/upload-artifact@v2
with:
name: Packages for ${{ matrix.distro }}
path: output
Copyright © 2020 Kunal Mehta under the GPL, version 3 or any later version. Originally based off of the nylas/gh-action-build-deb-buster action, which is Copyright © 2020 David Baumgold under the MIT License.