2024-11-29 01:23:35 +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
|
|
|
|
- name: Prepare package
|
|
|
|
run: |
|
|
|
|
mkdir -p \
|
2024-11-29 01:25:14 +01:00
|
|
|
package/debian/barcode-utils/usr/bin \
|
2024-11-29 01:23:35 +01:00
|
|
|
package/debian/barcode-utils/usr/share/webextensions
|
|
|
|
sed -re "s/__VERSION__/0.$(git rev-list --count HEAD)-1/g" -i package/debian/barcode-utils/DEBIAN/control
|
|
|
|
# barcode-websocket-server
|
|
|
|
cp barcode-websocket-server package/debian/barcode-utils/usr/bin/
|
|
|
|
# webextension-tabfocus
|
|
|
|
cd webextension-tabfocus
|
2024-11-29 01:27:34 +01:00
|
|
|
zip "../tabfocus-$(jq -r .version < manifest.json).zip" *
|
2024-11-29 01:23:35 +01:00
|
|
|
cd ..
|
|
|
|
cp tabfocus*zip package/debian/barcode-utils/usr/share/webextensions/
|
|
|
|
# package
|
|
|
|
find package/debian/barcode-utils -exec touch -m -d "$(git log -1 --format="%aI")" {} \;
|
|
|
|
cd package/debian/
|
|
|
|
dpkg-deb --build barcode-utils .
|
|
|
|
|
|
|
|
- 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"
|