diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2611a431..4ef1f739 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -49,7 +49,7 @@ jobs: working-directory: krillnotes-desktop run: npm ci - - name: Build and publish release + - name: Build release uses: tauri-apps/tauri-action@action-v0.6.2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -61,3 +61,26 @@ jobs: See the assets below to download this version and install it on your platform. releaseDraft: true prerelease: false + + - name: Fix AppImage .DirIcon symlink (workaround for tauri-apps/tauri#15110) + if: startsWith(matrix.platform, 'ubuntu') + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + ARCH=$(uname -m) + wget -q "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-${ARCH}.AppImage" \ + -O appimagetool + chmod +x appimagetool + + for appimage in target/release/bundle/appimage/*.AppImage; do + [ -f "$appimage" ] || continue + echo "Fixing $appimage..." + "$appimage" --appimage-extract + ln -sf Krillnotes.png squashfs-root/.DirIcon + APPIMAGE_EXTRACT_AND_RUN=1 ./appimagetool --comp zstd squashfs-root "$appimage" + rm -rf squashfs-root + done + + rm -f appimagetool + gh release upload "${{ github.ref_name }}" \ + target/release/bundle/appimage/*.AppImage --clobber diff --git a/krillnotes-desktop/src-tauri/src/commands/receive_poll.rs b/krillnotes-desktop/src-tauri/src/commands/receive_poll.rs index e06d836f..d032033b 100644 --- a/krillnotes-desktop/src-tauri/src/commands/receive_poll.rs +++ b/krillnotes-desktop/src-tauri/src/commands/receive_poll.rs @@ -6,8 +6,8 @@ use crate::AppState; use krillnotes_core::core::sync::relay::RelayClient; -use krillnotes_core::KrillnotesError; use krillnotes_core::core::sync::SyncChannel; +use krillnotes_core::KrillnotesError; use serde::Serialize; use std::sync::Arc; use tauri::{Emitter, State, Window}; diff --git a/krillnotes-desktop/src-tauri/src/commands/workspace.rs b/krillnotes-desktop/src-tauri/src/commands/workspace.rs index 9a162691..393a0e45 100644 --- a/krillnotes-desktop/src-tauri/src/commands/workspace.rs +++ b/krillnotes-desktop/src-tauri/src/commands/workspace.rs @@ -287,8 +287,10 @@ pub fn rebuild_menus( .expect("Mutex poisoned") .insert("macos".to_string(), result.workspace_items); *state.export_menu_item.lock().expect("Mutex poisoned") = Some(result.export_item); - *state.manage_scripts_menu_item.lock().expect("Mutex poisoned") = - Some(result.manage_scripts_item); + *state + .manage_scripts_menu_item + .lock() + .expect("Mutex poisoned") = Some(result.manage_scripts_item); // Re-enable workspace items if any workspace is currently open. let any_open = !state diff --git a/krillnotes-desktop/src-tauri/src/lib.rs b/krillnotes-desktop/src-tauri/src/lib.rs index 3293f089..c7408c21 100644 --- a/krillnotes-desktop/src-tauri/src/lib.rs +++ b/krillnotes-desktop/src-tauri/src/lib.rs @@ -364,8 +364,10 @@ pub fn run() { .insert("macos".to_string(), menu_result.workspace_items); *state.export_menu_item.lock().expect("Mutex poisoned") = Some(menu_result.export_item); - *state.manage_scripts_menu_item.lock().expect("Mutex poisoned") = - Some(menu_result.manage_scripts_item); + *state + .manage_scripts_menu_item + .lock() + .expect("Mutex poisoned") = Some(menu_result.manage_scripts_item); } // Ensure home directory exists