Skip to content

Commit

Permalink
Update GitHub Actions workflow for Rust versioning and improve macOS …
Browse files Browse the repository at this point in the history
…setup
  • Loading branch information
waveyboym committed Nov 23, 2024
1 parent 1e35698 commit f5c3ca5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,16 @@ jobs:
include:
- platform: 'macos-latest' # for Arm based macs (M1 and above).
args: '--target aarch64-apple-darwin'
rust-version: "1.56.0"
- platform: 'macos-latest' # for Intel based macs.
args: '--target x86_64-apple-darwin'
rust-version: "1.56.0"
- platform: 'ubuntu-22.04'
args: ''
rust-version: "stable"
- platform: 'windows-latest'
args: ''
rust-version: "stable"

runs-on: ${{ matrix.platform }}
steps:
Expand All @@ -45,10 +49,11 @@ jobs:
cache-dependency-path: './muzik-offline/package-lock.json' # Change this to your lock file path.

- name: install Rust stable
uses: dtolnay/rust-toolchain@stable # Set this to dtolnay/rust-toolchain@nightly
uses: dtolnay/rust-toolchain@master # Set this to dtolnay/rust-toolchain@nightly
with:
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
toolchain: ${{ matrix.rust-version }}

- name: Rust cache
uses: swatinem/rust-cache@v2
Expand Down Expand Up @@ -81,9 +86,9 @@ jobs:
- 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__'
with:
tagName: muzik-offline-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version.
releaseName: 'Muzik-offline v__VERSION__'
releaseBody: 'See the assets to download this version and install.'
releaseDraft: true
prerelease: false
Expand Down
2 changes: 1 addition & 1 deletion muzik-offline/src-tauri/src/app/setup_macos.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![cfg(target_os = "windows")]
#[cfg(target_os = "windows")]
pub fn setup_macos(_app: &mut tauri::App) -> Result<(), Box<dyn std::error::Error>> {
Ok(())
}
Expand Down
2 changes: 1 addition & 1 deletion muzik-offline/src-tauri/src/music/media_control_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use tauri::{AppHandle, Emitter, State};

pub fn config_mca() -> Option<MediaControls> {
#[cfg(not(target_os = "windows"))]
let hwnd: Option<*mut c_void> = None;
let hwnd: Option<*mut std::ffi::c_void> = None;

// map(|handle| handle as *mut std::os::raw::c_void)
#[cfg(target_os = "windows")]
Expand Down

0 comments on commit f5c3ca5

Please sign in to comment.