Skip to content

Commit

Permalink
release action
Browse files Browse the repository at this point in the history
  • Loading branch information
DominikPeters committed Jan 12, 2024
1 parent 3623771 commit 8f9d146
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 18 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/publish-to-auto-release.yml
Original file line number Diff line number Diff line change
@@ -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
35 changes: 17 additions & 18 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8f9d146

Please sign in to comment.