Files
nuchat/.gitea/workflows/release.yaml
Workflow config file is invalid. Please check your config file: yaml: line 50: mapping values are not allowed in this context
Fergus Molloy 54fdb0c932
All checks were successful
Backend Actions / check (push) Successful in 16s
Backend Actions / build (push) Successful in 19s
Backend Actions / test (push) Successful in 30s
add cache to release
2025-07-25 14:24:50 +01:00

52 lines
1.5 KiB
YAML

name: Backend Actions
run-name: ${{ gitea.actor }} is running backend actions
on: [push]
# push:
# tags:
# - 'v[0-9]+\.[0-9]+\.[0-9]+'
jobs:
package:
runs-on: rust-latest
steps:
- run: echo ${{ github.ref }}
- uses: actions/checkout@v4
- name: Create Output Directory
run: mkdir package
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '24'
- name: Load Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
backend/target
ui/node_modules
key: ${{ runner.os }}-package-${{ hashFiles('backend/Cargo.lock') }}-${{ hashFiles('ui/package-lock.json') }}
- name: Install UI Dependencies
working-directory: ui
run: npm ci
- name: Build UI
working-directory: ui
run: npm run build
- name: Copy Output
run: cp -rv ui/.output package/ui
- name: Build Backend
working-directory: backend
run: cargo build --release --locked
- name: Copy Binary
run: cp -v backend/target/release/nuchat package/
- name: Package Output
run: tar -cf - package | zstd -19 -T0 -o package.tar.zst
- name: Upload Package
run: curl -X PUT -H 'Authorization: token ${{ secrets.PACKAGE_API_KEY }}' --upload-file package.tar.zst 'https://git.molloy.xyz/api/packages/fergus-molloy/generic/nuchat/0.0.2/nuchat.tar.zst'