feat(desktop): release workflow + fix tauri build hooks (#205)

- beforeBuildCommand/beforeDevCommand run from the project root, not
  ui/ — use `yarn --cwd ui` so `tauri build`/`tauri dev` work again
- bundle.targets was [] which produces no artifacts; set "all" so
  each host OS emits its native bundles
- new desktop-release.yml: matrix build on ubuntu/windows/macos via
  tauri-action on `desktop-v*` tags — ships .msi/.exe, .dmg,
  .deb/.AppImage attached to the GitHub release
- ROADMAP Phase D updated to verified state

Verified locally on Linux: cargo test --workspace (49 tests) and
cargo tauri build -> Cloudreve_0.2.0_amd64.deb + .AppImage.

Generated with [Devin](https://devin.ai)

Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
pull/3587/head
Tomáš Dvořák 2 weeks ago committed by GitHub
parent 2d55fdccf6
commit 5f9f7a7156
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,60 @@
name: Desktop Release
# Tag `desktop-v*` builds and publishes the Tauri desktop app for
# Windows, macOS and Linux. Server releases stay on the `v*` tags
# handled by release.yml (goreleaser).
on:
push:
tags: ['desktop-v*']
workflow_dispatch:
permissions:
contents: write
jobs:
bundle:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: yarn
cache-dependency-path: desktop/ui/yarn.lock
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
workspaces: desktop
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libayatana-appindicator3-dev libgtk-3-dev librsvg2-dev patchelf
- name: Install UI dependencies
working-directory: desktop/ui
run: yarn install --frozen-lockfile
# tauri-action runs `tauri build` (which triggers beforeBuildCommand ->
# the UI build), produces the platform bundles and attaches them to the
# GitHub release for the pushed tag:
# Windows -> .msi + .exe (NSIS), macOS -> .dmg + .app.tar.gz,
# Linux -> .deb + .AppImage
# MSIX requires separate packaging + store signing; not covered here.
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
projectPath: desktop
tagName: ${{ github.ref_name }}
releaseName: 'Cloudreve Desktop ${{ github.ref_name }}'
releaseBody: 'Cloudreve Desktop for Linux, macOS, and Windows.'
releaseDraft: false
prerelease: false

@ -225,10 +225,11 @@ Goal: Windows + macOS + Linux from the `desktop/` tree in this repo.
|---|---|---|---|
| Placeholders/hydration | cfapi (keep) | File Provider ext (Swift bridge) | FUSE (`fuser`) or plain sync folder |
| Shell integration | shellext (keep) | Finder sync extension | Nautilus/Dolphin plugin (later) |
| Notifications | win32_notif → replace | `tauri-plugin-notification` (all platforms) | same |
| Notifications | win32_notif | `mac_notification_sys` | `notify_rust` |
| Sync core | shared: `cloudreve-api`, `inventory`, `tasks`, `uploader`, `drive/sync` | same | same |
- Port order: (1) strip `win32_notif`→tauri notifications (all platforms benefit), (2) abstract `drive/` behind a `HydrationProvider` trait (cfapi impl on Windows, stub→FUSE on Linux, FileProvider on macOS), (3) CI matrix build all 3, (4) MSIX→also ship .dmg/.AppImage/.deb.
- Status: (1) notifications already per-OS (`win32_notif` / `notify_rust` / `mac_notification_sys`) — no abstraction needed; (2) hydration abstracted via `drive/placeholder` cfg swap — `cfapi` on Windows, `placeholder_non_windows` full-sync adapter elsewhere (FUSE / File Provider still open); (3) CI matrix builds + tests all 3 OSes; (4) packaging: `desktop-release.yml` on `desktop-v*` tags ships .msi/.exe (Windows), .dmg (macOS), .deb/.AppImage (Linux) — MSIX deferred (needs store signing).
- Verified on Linux: `cargo test --workspace` green (49 tests), `cargo tauri build` produces working .deb + .AppImage.
- Feature fallback on Linux/macOS until providers land: full sync without placeholders (download-on-access still works via sync engine).
## 7. Phase E — Android app (native, no iOS)

@ -6,8 +6,8 @@
"build": {
"frontendDist": "../ui/dist",
"devUrl": "http://localhost:5173",
"beforeDevCommand": "yarn run dev",
"beforeBuildCommand": "yarn run build"
"beforeDevCommand": "yarn --cwd ui run dev",
"beforeBuildCommand": "yarn --cwd ui run build"
},
"app": {
"enableGTKAppId": true,
@ -38,7 +38,7 @@
},
"bundle": {
"active": true,
"targets": [],
"targets": "all",
"icon": [
"icons/32x32.png",
"icons/128x128.png",

Loading…
Cancel
Save