diff --git a/.github/workflows/publish-to-auto-release.yml b/.github/workflows/publish-to-auto-release.yml new file mode 100644 index 0000000..e4754ff --- /dev/null +++ b/.github/workflows/publish-to-auto-release.yml @@ -0,0 +1,49 @@ +name: "publish" + +on: + push: + branches: + - release + +# This is the example from the readme. +# On each push to the `release` branch it will create or update a GitHub release, build your app, and upload the artifacts to the release. + +jobs: + publish-tauri: + permissions: + contents: write + strategy: + fail-fast: false + matrix: + platform: [macos-latest, ubuntu-20.04, windows-latest] + + runs-on: ${{ matrix.platform }} + steps: + - uses: actions/checkout@v4 + + - name: setup node + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: install Rust stable + uses: dtolnay/rust-toolchain@stable + + - name: install dependencies (ubuntu only) + if: matrix.platform == 'ubuntu-20.04' + run: | + sudo apt-get update + sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf + + - name: install frontend dependencies + run: npm install # change this to npm or pnpm depending on which one you use + + - uses: tauri-apps/tauri-action@v0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version + releaseName: "App v__VERSION__" + releaseBody: "See the assets to download this version and install." + releaseDraft: true + prerelease: false diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 1046510..b306297 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -18,24 +18,23 @@ fn main() { .add_item(CustomMenuItem::new("open".to_string(), "Open").accelerator("CmdOrCtrl+O")) .add_native_item(CloseWindow)); - let playback_speed_menu = Menu::new() - .add_item(CustomMenuItem::new("0.5x".to_string(), "0.5x")) - .add_item(CustomMenuItem::new("0.75x".to_string(), "0.75x")) - .add_item(CustomMenuItem::new("1x".to_string(), "1x")) - .add_item(CustomMenuItem::new("1.25x".to_string(), "1.25x")) - .add_item(CustomMenuItem::new("1.5x".to_string(), "1.5x")) - .add_item(CustomMenuItem::new("1.75x".to_string(), "1.75x")) - .add_item(CustomMenuItem::new("2x".to_string(), "2x")); - - let playback_menu = Submenu::new("Playback", Menu::new() - .add_item(CustomMenuItem::new("play_pause".to_string(), "Play/Pause")) - .add_submenu(Submenu::new("Playback Speed", playback_speed_menu)) - .add_item(CustomMenuItem::new("next_chapter".to_string(), "Next Chapter")) - .add_item(CustomMenuItem::new("prev_chapter".to_string(), "Previous Chapter"))); - - let window_menu = Submenu::new("Window", Menu::new() - // Assuming you will handle listing open windows dynamically - ); + // let playback_speed_menu = Menu::new() + // .add_item(CustomMenuItem::new("0.5x".to_string(), "0.5x")) + // .add_item(CustomMenuItem::new("0.75x".to_string(), "0.75x")) + // .add_item(CustomMenuItem::new("1x".to_string(), "1x")) + // .add_item(CustomMenuItem::new("1.25x".to_string(), "1.25x")) + // .add_item(CustomMenuItem::new("1.5x".to_string(), "1.5x")) + // .add_item(CustomMenuItem::new("1.75x".to_string(), "1.75x")) + // .add_item(CustomMenuItem::new("2x".to_string(), "2x")); + + // let playback_menu = Submenu::new("Playback", Menu::new() + // .add_item(CustomMenuItem::new("play_pause".to_string(), "Play/Pause")) + // .add_submenu(Submenu::new("Playback Speed", playback_speed_menu)) + // .add_item(CustomMenuItem::new("next_chapter".to_string(), "Next Chapter")) + // .add_item(CustomMenuItem::new("prev_chapter".to_string(), "Previous Chapter"))); + + // let window_menu = Submenu::new("Window", Menu::new() + // ); let menu = Menu::new() .add_submenu(app_menu)