From 760df0c5f783dc68a771104f2c6f0b3fec76a21d Mon Sep 17 00:00:00 2001 From: Jonson Petard <41122242+greenhat616@users.noreply.github.com> Date: Fri, 20 Sep 2024 12:23:53 +0800 Subject: [PATCH] ci: add windows arm64 build --- .../workflows/deps-build-windows-nsis.yaml | 23 +++++++++++++++++-- .github/workflows/target-dev-build.yaml | 12 ++++++++++ 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deps-build-windows-nsis.yaml b/.github/workflows/deps-build-windows-nsis.yaml index 0283ccd467..5bf5760cf3 100644 --- a/.github/workflows/deps-build-windows-nsis.yaml +++ b/.github/workflows/deps-build-windows-nsis.yaml @@ -28,7 +28,7 @@ on: options: - x86_64 - i686 - # - aarch64 + - aarch64 workflow_call: inputs: @@ -103,6 +103,9 @@ jobs: 'i686' { pnpm check --arch ia32 --sidecar-host i686-pc-windows-msvc } + 'aarch64' { + pnpm check --arch arm64 --sidecar-host aarch64-pc-windows-msvc + } } - name: Prepare (Windows NSIS and Portable) @@ -131,7 +134,7 @@ jobs: - name: Tauri build i686 uses: tauri-apps/tauri-action@v0 - if: ${{ inputs.arch != 'x86_64' }} + if: ${{ inputs.arch == 'i686' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} @@ -145,6 +148,22 @@ jobs: prerelease: true tauriScript: pnpm tauri args: ${{ inputs.nightly == true && '-f nightly -c ./backend/tauri/tauri.nightly.conf.json --target i686-pc-windows-msvc' || '-f default-meta --target i686-pc-windows-msvc' }} + - name: Tauri build arm64 + uses: tauri-apps/tauri-action@v0 + if: ${{ inputs.arch == 'aarch64' }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} + TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} + NIGHTLY: ${{ inputs.nightly == true && 'true' || 'false' }} + with: + tagName: ${{ inputs.tag }} + releaseName: "Clash Nyanpasu Dev" + releaseBody: "More new features are now supported." + releaseDraft: false + prerelease: true + tauriScript: pnpm tauri + args: ${{ inputs.nightly == true && '-f nightly -c ./backend/tauri/tauri.nightly.conf.json --target aarch64-pc-windows-msvc' || '-f default-meta --target aarch64-pc-windows-msvc' }} - name: Portable Bundle if: ${{ inputs.portable == true }} diff --git a/.github/workflows/target-dev-build.yaml b/.github/workflows/target-dev-build.yaml index f8298c3d48..3277267056 100644 --- a/.github/workflows/target-dev-build.yaml +++ b/.github/workflows/target-dev-build.yaml @@ -28,6 +28,17 @@ jobs: tag: "pre-release" secrets: inherit + windows_aarch64_build: + name: Windows aarch64 Build + uses: ./.github/workflows/deps-build-windows-nsis.yaml + needs: [delete_current_releases] + with: + portable: true + nightly: true + arch: "aarch64" + tag: "pre-release" + secrets: inherit + windows_i686_build: name: Windows i686 Build uses: ./.github/workflows/deps-build-windows-nsis.yaml @@ -115,6 +126,7 @@ jobs: [ windows_amd64_build, windows_i686_build, + windows_aarch64_build, linux_amd64_build, linux_i686_build, linux_aarch64_build,