pipeline and config

This commit is contained in:
pavel 2026-02-10 21:12:58 +01:00
commit 8dcc6b05db
3 changed files with 43 additions and 9 deletions

View file

@ -0,0 +1,32 @@
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: |
npm install
npm run build
- run: ~/.cargo/bin/cargo build -r
- run: |
curl -X POST \
-H "Authorization: token ${{ github.token }}" \
-F "attachment=@target/release/bot" \
"${{ 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
systemctl --user stop bot
cp target/release/bot ~/bot/bot
chmod +x ~/bot/bot
mkdir -p ~/bot/fe
rm -rf ~/bot/fe/*
cp -r dist/* ~/bot/fe/
systemctl --user start bot