2024-11-29 01:43:17 +01:00
|
|
|
---
|
|
|
|
|
|
|
|
on: push
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
build_debian:
|
|
|
|
runs-on: docker
|
|
|
|
container:
|
|
|
|
image: git.kabelsalat.ch/s3lph/package-pipeline-builder:latest
|
|
|
|
steps:
|
|
|
|
- uses: https://code.forgejo.org/actions/checkout@v4
|
2024-11-29 02:14:20 +01:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2024-11-29 01:43:17 +01:00
|
|
|
- name: Prepare package
|
|
|
|
run: |
|
|
|
|
mkdir -p \
|
|
|
|
package/debian/honeywell-config/usr/bin \
|
2024-11-30 21:39:50 +01:00
|
|
|
package/debian/honeywell-config/usr/lib/udev/rules.d/ \
|
|
|
|
package/debian/honeywell-config/usr/share/man/man1/
|
2024-11-29 02:00:38 +01:00
|
|
|
sed -re "s/__VERSION__/0.$(git rev-list --count ${GITHUB_REF_NAME})-1/g" -i package/debian/honeywell-config/DEBIAN/control
|
2024-11-30 21:39:50 +01:00
|
|
|
apt install --yes libusb-1.0-0-dev help2man
|
2024-11-29 01:43:17 +01:00
|
|
|
make
|
|
|
|
strip honeywell-config
|
|
|
|
cp honeywell-config package/debian/honeywell-config/usr/bin
|
2024-11-30 21:39:50 +01:00
|
|
|
PATH=$PATH:. help2man -N -v -V -h -h ./honeywell-config > package/debian/honeywell-config/usr/share/man/man1/honeywell-config.1
|
|
|
|
gzip -9n package/debian/honeywell-config/usr/share/man/man1/honeywell-config.1
|
2024-11-29 01:43:17 +01:00
|
|
|
cp 99-honeywell.rules package/debian/honeywell-config/usr/lib/udev/rules.d/
|
|
|
|
find package/debian/honeywell-config -exec touch -m -d "$(git log -1 --format="%aI")" {} \;
|
|
|
|
cd package/debian/
|
|
|
|
dpkg-deb --build honeywell-config .
|
|
|
|
|
|
|
|
- uses: https://git.kabelsalat.ch/s3lph/forgejo-action-debian-package-upload@v2
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.API_USERNAME }}
|
|
|
|
password: ${{ secrets.API_PASSWORD }}
|
|
|
|
deb: "package/debian/*.deb"
|