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
parent
2d55fdccf6
commit
5f9f7a7156
@ -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
|
||||||
Loading…
Reference in new issue