25 lines
No EOL
793 B
YAML
25 lines
No EOL
793 B
YAML
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 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 |