Set up Debian package builds
Some checks failed
Build / build (push) Failing after 1m8s

This commit is contained in:
polyfloyd 2025-06-05 16:03:40 +02:00
parent 57758986e7
commit d7c21f747b

View file

@ -0,0 +1,50 @@
name: Build
on:
push:
branches:
- master
jobs:
build:
runs-on: docker
container:
image: debian:bookworm
steps:
- run: |-
apt update
apt install -y \
nodejs git curl make gcc pkg-config \
libasound2-dev libboost-dev libjack-dev
- uses: actions/checkout@v4
- run: ./waf configure
- run: ./waf
- name: Build Debian package
run: |-
mkdir -p deb/DEBIAN
cat <<EOF | tee deb/DEBIAN/control
Package: ampswitch
Version: 0.$(date --date="@$(git show -s --format='%ct' HEAD)" '+%4Y%m%d.%H%M%S')
Section: base
Priority: optional
Architecture: amd64
Maintainer: polyfloyd <floy@polyfloyd.net>, Bob <bob-nospam-@xbmc.org>
Description: Executes a command triggered by jack audio
Depends: libasound2, libboost-dev, libjack0
EOF
install -D -m 0755 build/ampswitch deb/usr/bin/ampswitch
dpkg-deb --build deb ampswitch.deb
- name: Deploy Debian package
run: |-
curl \
--fail \
--user ${{ secrets.PKG_RELEASE_CREDENTIALS }} \
--upload-file ampswitch.deb \
$GITHUB_SERVER_URL/api/packages/$GITHUB_REPOSITORY_OWNER/debian/pool/stable/main/upload