diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 38aca07..1f98ce7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,7 +7,16 @@ on: jobs: release-ubuntu: - runs-on: ubuntu-latest + permissions: + contents: write + strategy: + matrix: + include: + - runs-on: ubuntu-latest + arch: amd64 + - runs-on: ubuntu-24.04-arm + arch: arm64 + runs-on: ${{ matrix.runs-on }} steps: - uses: actions/checkout@v4 @@ -26,7 +35,7 @@ jobs: - uses: Swatinem/rust-cache@v2 with: - shared-key: ${{ runner.os }} + shared-key: ${{ runner.os }}-${{ matrix.arch }} - name: Install cargo-deb run: cargo install cargo-deb @@ -37,7 +46,7 @@ jobs: cargo deb -p "$f" || exit 1 done - - name: Create Release (Ubuntu) + - name: Create Release (Ubuntu ${{ matrix.arch }}) id: create_release_ubuntu uses: ncipollo/release-action@v1 with: @@ -47,4 +56,4 @@ jobs: omitNameDuringUpdate: true omitBodyDuringUpdate: true omitPrereleaseDuringUpdate: true - artifacts: target/debian/*.deb \ No newline at end of file + artifacts: target/debian/*.deb diff --git a/ares-install/src/main.rs b/ares-install/src/main.rs index 503ca97..a2580a4 100644 --- a/ares-install/src/main.rs +++ b/ares-install/src/main.rs @@ -45,7 +45,7 @@ struct Cli { fn main() { let cli = Cli::parse(); let manager = DeviceManager::default(); - let device = manager.find_or_default(cli.device).unwrap(); + let device = manager.find_or_default(cli.device.as_ref()).unwrap(); if device.is_none() { eprintln!("Device not found"); exit(1); diff --git a/ares-launch/src/main.rs b/ares-launch/src/main.rs index 9e9b0ee..62921f9 100644 --- a/ares-launch/src/main.rs +++ b/ares-launch/src/main.rs @@ -59,7 +59,7 @@ struct LaunchResponse { fn main() { let cli = Cli::parse(); let manager = DeviceManager::default(); - let device = manager.find_or_default(cli.device).unwrap(); + let device = manager.find_or_default(cli.device.as_ref()).unwrap(); if device.is_none() { eprintln!("Device not found"); exit(1); diff --git a/ares-push/src/main.rs b/ares-push/src/main.rs index ed1683d..d9500a6 100644 --- a/ares-push/src/main.rs +++ b/ares-push/src/main.rs @@ -37,7 +37,7 @@ struct Cli { fn main() { let cli = Cli::parse(); let manager = DeviceManager::default(); - let Some(device) = manager.find_or_default(cli.device).unwrap() else { + let Some(device) = manager.find_or_default(cli.device.as_ref()).unwrap() else { eprintln!("Device not found"); exit(1); };