48 lines
1.3 KiB
YAML
48 lines
1.3 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
|
|
build:
|
|
runs-on: debian-latest
|
|
|
|
steps:
|
|
- run: |-
|
|
apt update
|
|
apt install -y \
|
|
python3 git curl make gcc g++ pkg-config \
|
|
libboost-dev libjack-dev nlohmann-json3-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: 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
|