From 7a2ed233be03e71dba6a57654f2891c67993c03c Mon Sep 17 00:00:00 2001 From: t8y2 <1156263951@qq.com> Date: Mon, 8 Jun 2026 19:18:53 +0800 Subject: [PATCH] ci(release): add Windows ARM64 build target - Add aarch64-pc-windows-msvc to release build matrix - Make portable ZIP arch dynamic (x64/arm64) - Update Scoop manifest for arm64 architecture --- .github/workflows/publish-packages.yml | 16 +++++++++++++--- .github/workflows/release.yml | 11 ++++++++--- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish-packages.yml b/.github/workflows/publish-packages.yml index 80e1234b9..3dcb32893 100644 --- a/.github/workflows/publish-packages.yml +++ b/.github/workflows/publish-packages.yml @@ -45,6 +45,7 @@ jobs: "${PRODUCT_NAME}_${VERSION}_aarch64.dmg" "${PRODUCT_NAME}_${VERSION}_x64.dmg" "${PRODUCT_NAME}_${VERSION}_x64-setup.exe" + "${PRODUCT_NAME}_${VERSION}_arm64-setup.exe" ) for ASSET in "${ASSETS[@]}"; do @@ -79,7 +80,8 @@ jobs: echo "SHA256 hashes:" compute_hash "artifacts/${PRODUCT_NAME}_${VERSION}_aarch64.dmg" "sha_dmg_arm64" compute_hash "artifacts/${PRODUCT_NAME}_${VERSION}_x64.dmg" "sha_dmg_x64" - compute_hash "artifacts/${PRODUCT_NAME}_${VERSION}_x64-setup.exe" "sha_exe" + compute_hash "artifacts/${PRODUCT_NAME}_${VERSION}_x64-setup.exe" "sha_exe_x64" + compute_hash "artifacts/${PRODUCT_NAME}_${VERSION}_arm64-setup.exe" "sha_exe_arm64" - name: Publish Homebrew Cask env: @@ -148,7 +150,8 @@ jobs: TAP_GITHUB_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }} run: | VERSION="${{ steps.version.outputs.version }}" - SHA_EXE="${{ steps.hashes.outputs.sha_exe }}" + SHA_EXE_X64="${{ steps.hashes.outputs.sha_exe_x64 }}" + SHA_EXE_ARM64="${{ steps.hashes.outputs.sha_exe_arm64 }}" git clone --depth 1 \ "https://x-access-token:${TAP_GITHUB_TOKEN}@github.com/${REPO_OWNER}/scoop-bucket.git" \ @@ -164,7 +167,11 @@ jobs: "architecture": { "64bit": { "url": "https://github.com/${REPO_OWNER}/${APP_NAME}/releases/download/v${VERSION}/${PRODUCT_NAME}_${VERSION}_x64-setup.exe", - "hash": "${SHA_EXE}" + "hash": "${SHA_EXE_X64}" + }, + "arm64": { + "url": "https://github.com/${REPO_OWNER}/${APP_NAME}/releases/download/v${VERSION}/${PRODUCT_NAME}_${VERSION}_arm64-setup.exe", + "hash": "${SHA_EXE_ARM64}" } }, "innosetup": false, @@ -182,6 +189,9 @@ jobs: "architecture": { "64bit": { "url": "https://github.com/${REPO_OWNER}/${APP_NAME}/releases/download/v\$version/${PRODUCT_NAME}_\$version_x64-setup.exe" + }, + "arm64": { + "url": "https://github.com/${REPO_OWNER}/${APP_NAME}/releases/download/v\$version/${PRODUCT_NAME}_\$version_arm64-setup.exe" } } } diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 545f55922..d3c98f87d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -65,6 +65,10 @@ jobs: target: aarch64-unknown-linux-gnu - platform: windows-latest target: x86_64-pc-windows-msvc + arch: x64 + - platform: windows-latest + target: aarch64-pc-windows-msvc + arch: arm64 runs-on: ${{ matrix.platform }} steps: @@ -176,15 +180,16 @@ jobs: args: --target ${{ matrix.target }} - name: Upload Windows portable ZIP - if: matrix.platform == 'windows-latest' + if: matrix.arch == 'x64' || matrix.arch == 'arm64' shell: pwsh env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | $version = "${env:GITHUB_REF_NAME}".TrimStart("v") + $arch = "${{ matrix.arch }}" $portableRoot = "portable" - $portableDir = Join-Path $portableRoot "DBX_${version}_x64" - $zipName = "DBX_${version}_x64-portable.zip" + $portableDir = Join-Path $portableRoot "DBX_${version}_${arch}" + $zipName = "DBX_${version}_${arch}-portable.zip" $exePath = "target/${{ matrix.target }}/release/dbx.exe" if (!(Test-Path $exePath)) {