8
0
Fork 0
bitvis-http/.forgejo/workflows/build.yaml
polyfloyd 22793837bf
All checks were successful
Build / build (push) Successful in 36s
ci: Run on debian-latest
2025-07-03 22:46:33 +02:00

45 lines
1.2 KiB
YAML

name: Build
on:
push:
branches:
- main
jobs:
build:
runs-on: debian-latest
steps:
- run: |-
apt update
apt install -y git curl golang
- uses: actions/checkout@v4
- run: go build -o bitvis-http
- name: Build Debian package
run: |-
mkdir -p deb/DEBIAN
cat <<EOF | tee deb/DEBIAN/control
Package: bitvis-http
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>
Description: Virtual BitPanel over HTTP
EOF
install -D -m 0755 support/postinst deb/DEBIAN/postinst
install -D -m 0755 bitvis-http deb/usr/bin/bitvis-http
install -D support/systemd.service deb/lib/systemd/system/bitvis-http.service
dpkg-deb --build deb bitvis-http.deb
- name: Deploy Debian package
run: |-
curl \
--fail \
--user ${{ secrets.PKG_RELEASE_CREDENTIALS }} \
--upload-file bitvis-http.deb \
$GITHUB_SERVER_URL/api/packages/$GITHUB_REPOSITORY_OWNER/debian/pool/stable/main/upload