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
This commit is contained in:
t8y2 committed 2026-06-08 19:18:53 +08:00
1 parent a3f045822c
commit 7a2ed233be
2 files changed
+21 -6

No files matched your search

+13 -3
View File
@@ -45,6 +45,7 @@ jobs:
"${PRODUCT_NAME}_${VERSION}_aarch64.dmg" "${PRODUCT_NAME}_${VERSION}_aarch64.dmg"
"${PRODUCT_NAME}_${VERSION}_x64.dmg" "${PRODUCT_NAME}_${VERSION}_x64.dmg"
"${PRODUCT_NAME}_${VERSION}_x64-setup.exe" "${PRODUCT_NAME}_${VERSION}_x64-setup.exe"
"${PRODUCT_NAME}_${VERSION}_arm64-setup.exe"
) )
for ASSET in "${ASSETS[@]}"; do for ASSET in "${ASSETS[@]}"; do
@@ -79,7 +80,8 @@ jobs:
echo "SHA256 hashes:" echo "SHA256 hashes:"
compute_hash "artifacts/${PRODUCT_NAME}_${VERSION}_aarch64.dmg" "sha_dmg_arm64" 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.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 - name: Publish Homebrew Cask
env: env:
@@ -148,7 +150,8 @@ jobs:
TAP_GITHUB_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }} TAP_GITHUB_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }}
run: | run: |
VERSION="${{ steps.version.outputs.version }}" 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 \ git clone --depth 1 \
"https://x-access-token:${TAP_GITHUB_TOKEN}@github.com/${REPO_OWNER}/scoop-bucket.git" \ "https://x-access-token:${TAP_GITHUB_TOKEN}@github.com/${REPO_OWNER}/scoop-bucket.git" \
@@ -164,7 +167,11 @@ jobs:
"architecture": { "architecture": {
"64bit": { "64bit": {
"url": "https://github.com/${REPO_OWNER}/${APP_NAME}/releases/download/v${VERSION}/${PRODUCT_NAME}_${VERSION}_x64-setup.exe", "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, "innosetup": false,
@@ -182,6 +189,9 @@ jobs:
"architecture": { "architecture": {
"64bit": { "64bit": {
"url": "https://github.com/${REPO_OWNER}/${APP_NAME}/releases/download/v\$version/${PRODUCT_NAME}_\$version_x64-setup.exe" "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"
} }
} }
} }
+8 -3
View File
@@ -65,6 +65,10 @@ jobs:
target: aarch64-unknown-linux-gnu target: aarch64-unknown-linux-gnu
- platform: windows-latest - platform: windows-latest
target: x86_64-pc-windows-msvc target: x86_64-pc-windows-msvc
arch: x64
- platform: windows-latest
target: aarch64-pc-windows-msvc
arch: arm64
runs-on: ${{ matrix.platform }} runs-on: ${{ matrix.platform }}
steps: steps:
@@ -176,15 +180,16 @@ jobs:
args: --target ${{ matrix.target }} args: --target ${{ matrix.target }}
- name: Upload Windows portable ZIP - name: Upload Windows portable ZIP
if: matrix.platform == 'windows-latest' if: matrix.arch == 'x64' || matrix.arch == 'arm64'
shell: pwsh shell: pwsh
env: env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: | run: |
$version = "${env:GITHUB_REF_NAME}".TrimStart("v") $version = "${env:GITHUB_REF_NAME}".TrimStart("v")
$arch = "${{ matrix.arch }}"
$portableRoot = "portable" $portableRoot = "portable"
$portableDir = Join-Path $portableRoot "DBX_${version}_x64" $portableDir = Join-Path $portableRoot "DBX_${version}_${arch}"
$zipName = "DBX_${version}_x64-portable.zip" $zipName = "DBX_${version}_${arch}-portable.zip"
$exePath = "target/${{ matrix.target }}/release/dbx.exe" $exePath = "target/${{ matrix.target }}/release/dbx.exe"
if (!(Test-Path $exePath)) { if (!(Test-Path $exePath)) {