diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2ed3226..69608dc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -66,7 +66,6 @@ jobs: docker-push: name: Docker Push runs-on: ubuntu-latest - needs: [] steps: - uses: actions/checkout@v4 @@ -102,16 +101,27 @@ jobs: cache-from: type=gha cache-to: type=gha,mode=max - build-tauri-linux: - name: Build Tauri (Linux) - runs-on: ubuntu-latest + build-tauri: + name: Build Tauri (${{ matrix.platform }}) + strategy: + fail-fast: false + matrix: + include: + - platform: linux + runner: ubuntu-latest + - platform: macos + runner: macos-latest + - platform: windows + runner: windows-latest + runs-on: ${{ matrix.runner }} steps: - uses: actions/checkout@v4 - name: Install Rust stable uses: dtolnay/rust-toolchain@stable - - name: Install system dependencies + - name: Install system dependencies (Linux) + if: matrix.platform == 'linux' run: | sudo apt-get update sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev libssl-dev @@ -126,72 +136,11 @@ jobs: - name: Install frontend deps run: cd client/src-ui && npm ci - - name: Build Tauri (Linux) + - name: Build Tauri uses: tauri-apps/tauri-action@v0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - projectPath: client - tagName: ${{ github.ref_name }} - releaseName: "EifelDC ${{ github.ref_name }}" - releaseBody: "See [CHANGELOG.md](CHANGELOG.md) for details." - releaseDraft: true - - build-tauri-macos: - name: Build Tauri (macOS) - runs-on: macos-latest - steps: - - uses: actions/checkout@v4 - - - name: Install Rust stable - uses: dtolnay/rust-toolchain@stable - - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: npm - cache-dependency-path: client/src-ui/package-lock.json - - - name: Install frontend deps - run: cd client/src-ui && npm ci - - - name: Build Tauri (macOS) - uses: tauri-apps/tauri-action@v0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - projectPath: client - tagName: ${{ github.ref_name }} - releaseName: "EifelDC ${{ github.ref_name }}" - releaseBody: "See [CHANGELOG.md](CHANGELOG.md) for details." - releaseDraft: true - - build-tauri-windows: - name: Build Tauri (Windows) - runs-on: windows-latest - steps: - - uses: actions/checkout@v4 - - - name: Install Rust stable - uses: dtolnay/rust-toolchain@stable - - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: npm - cache-dependency-path: client/src-ui/package-lock.json - - - name: Install frontend deps - run: cd client/src-ui && npm ci - - - name: Build Tauri (Windows) - uses: tauri-apps/tauri-action@v0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - projectPath: client tagName: ${{ github.ref_name }} releaseName: "EifelDC ${{ github.ref_name }}" releaseBody: "See [CHANGELOG.md](CHANGELOG.md) for details." diff --git a/client/src-ui/package-lock.json b/client/src-ui/package-lock.json index fd320e1..b0a5611 100644 --- a/client/src-ui/package-lock.json +++ b/client/src-ui/package-lock.json @@ -12,7 +12,7 @@ }, "devDependencies": { "@sveltejs/vite-plugin-svelte": "^3", - "@tauri-apps/api": "^1", + "@tauri-apps/api": "^2.10.1", "svelte": "^4", "svelte-check": "^3", "svelte-preprocess": "^5.1.4", @@ -878,16 +878,11 @@ } }, "node_modules/@tauri-apps/api": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-1.6.0.tgz", - "integrity": "sha512-rqI++FWClU5I2UBp4HXFvl+sBWkdigBkxnpJDQUWttNyG7IZP4FwQGhTNL5EOw0vI8i6eSAJ5frLqO7n7jbJdg==", + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-2.10.1.tgz", + "integrity": "sha512-hKL/jWf293UDSUN09rR69hrToyIXBb8CjGaWC7gfinvnQrBVvnLr08FeFi38gxtugAVyVcTa5/FD/Xnkb1siBw==", "dev": true, "license": "Apache-2.0 OR MIT", - "engines": { - "node": ">= 14.6.0", - "npm": ">= 6.6.0", - "yarn": ">= 1.19.1" - }, "funding": { "type": "opencollective", "url": "https://opencollective.com/tauri" diff --git a/client/src-ui/package.json b/client/src-ui/package.json index b86a8ec..b1e2ba5 100644 --- a/client/src-ui/package.json +++ b/client/src-ui/package.json @@ -11,7 +11,7 @@ }, "devDependencies": { "@sveltejs/vite-plugin-svelte": "^3", - "@tauri-apps/api": "^1", + "@tauri-apps/api": "^2.10.1", "svelte": "^4", "svelte-check": "^3", "svelte-preprocess": "^5.1.4", diff --git a/client/src-ui/src/App.svelte b/client/src-ui/src/App.svelte index b4fed6d..9825528 100644 --- a/client/src-ui/src/App.svelte +++ b/client/src-ui/src/App.svelte @@ -34,7 +34,7 @@ if (isTauri()) { try { - const { invoke } = await import('@tauri-apps/api/tauri'); + const { invoke } = await import('@tauri-apps/api/core'); const user: string | null = await invoke('get_current_user'); if (user) { loggedIn = true; diff --git a/client/src-ui/src/lib/api.ts b/client/src-ui/src/lib/api.ts index 16672dc..1dd279b 100644 --- a/client/src-ui/src/lib/api.ts +++ b/client/src-ui/src/lib/api.ts @@ -106,7 +106,7 @@ function clearToken() { } async function tauriInvoke(cmd: string, args: Record): Promise { - const { invoke } = await import('@tauri-apps/api/tauri'); + const { invoke } = await import('@tauri-apps/api/core'); return invoke(cmd, args); } @@ -483,7 +483,7 @@ export async function uploadFile(roomId: string, file: File): Promise { formData.append('file', file); if (isTauri()) { - const { invoke } = await import('@tauri-apps/api/tauri'); + const { invoke } = await import('@tauri-apps/api/core'); const arrayBuffer = await file.arrayBuffer(); const bytes = Array.from(new Uint8Array(arrayBuffer)); return invoke('upload_avatar', { fileName: file.name, mimeType: file.type, bytes }); @@ -571,7 +571,7 @@ export async function setRoomAvatar(roomId: string, file: File): Promise