feat: Add CI/CD pipeline for release deployment and make server host/port configurable via environment variables.
Some checks failed
/ upload (release) Failing after 3s
Some checks failed
/ upload (release) Failing after 3s
This commit is contained in:
parent
24e6ac26f1
commit
131b3cc82a
2 changed files with 31 additions and 3 deletions
25
.forgejo/workflows/pipeline.yaml
Normal file
25
.forgejo/workflows/pipeline.yaml
Normal 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 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue