feat: Add CI/CD pipeline for release deployment and make server host/port configurable via environment variables.
Some checks failed
/ upload (release) Failing after 1m14s

This commit is contained in:
pavel 2026-02-07 00:04:46 +01:00
commit b098214a9d
2 changed files with 31 additions and 3 deletions

View file

@ -0,0 +1,25 @@
on:
release:
types: [published]
jobs:
upload:
runs-on: host
permissions:
packages: write
steps:
- uses: actions/setup-node@v6
with:
node-version: 24
- uses: actions/checkout@v6
- run: ~/.cargo/bin/cargo build -r
- run: |
curl -X POST \
-H "Authorization: token ${{ github.token }}" \
-F "attachment=@target/release/chat" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/${{ github.event.release.id }}/assets"
- run: |
export XDG_RUNTIME_DIR=/run/user/$(id -u)
export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus
cp target/release/chat ~/chat/chat
chmod +x ~/chat/chat
systemctl --user restart chat