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:
parent
a3f045822c
commit
7a2ed233be
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue