From 30b27c947261500c1012b808b81628a640bfbb81 Mon Sep 17 00:00:00 2001 From: qii404 Date: Sun, 3 Nov 2024 14:32:10 +0800 Subject: [PATCH] GitHub action build update (#1281) * add build arch * update mac target * update actions --- .github/workflows/build_mac.yml | 2 +- pack/electron/package.json | 9 +++++---- package.json | 3 +-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build_mac.yml b/.github/workflows/build_mac.yml index 37997481f..4a30b1767 100644 --- a/.github/workflows/build_mac.yml +++ b/.github/workflows/build_mac.yml @@ -31,7 +31,7 @@ jobs: node-version: 16 - run: npm ci - run: npm run pack:prepare - - run: npm run pack:macm1:publish + # - run: npm run pack:macm1:publish - run: npm run pack:mac:publish - name: Cleanup keychain diff --git a/pack/electron/package.json b/pack/electron/package.json index 7ef0bda3e..178c4cb52 100644 --- a/pack/electron/package.json +++ b/pack/electron/package.json @@ -13,7 +13,7 @@ "build": { "appId": "me.qii404.another-redis-desktop-manager", "productName": "Another Redis Desktop Manager", - "artifactName": "${productName}.${version}.${ext}", + "artifactName": "${productName}-${os}-${version}-${arch}.${ext}", "copyright": "Copyright © 2024 qii404", "asar": true, "directories": { @@ -35,7 +35,8 @@ "win": { "icon": "icons/icon.ico", "target": [ - "nsis" + {"target": "nsis", "arch": ["x64", "arm64"]}, + {"target": "zip", "arch": ["x64"]} ] }, "nsis": { @@ -48,7 +49,7 @@ "icon": "icons/icon.png", "category": "Utility", "target": [ - "AppImage" + {"target": "AppImage", "arch": ["x64", "arm64"]} ] }, "snap": { @@ -59,7 +60,7 @@ "type": "development", "category": "public.app-category.developer-tools", "target": [ - "dmg" + {"target": "dmg", "arch": ["x64", "arm64"]} ], "extendInfo": { "ElectronTeamID": "68JN8DV835" diff --git a/package.json b/package.json index 49cfea338..20c94baca 100644 --- a/package.json +++ b/package.json @@ -19,10 +19,9 @@ "pack:mas": "CSC_IDENTITY_AUTO_DISCOVERY=false npm run pack:mac", "pack:linux": "electron-builder --project=dist -l -p never", "pack:win:publish": "electron-builder --project=dist -w -p always", - "pack:mac:publish": "electron-builder --project=dist -m --x64 -p always", + "pack:mac:publish": "electron-builder --project=dist -m -p always", "pack:macm1:publish": "electron-builder --project=dist -m --arm64 -p always -c.artifactName='${productName} M1 ${arch} ${version}.${ext}'", "pack:linux:publish": "electron-builder --project=dist -l -p always", - "pack:win:docker": "docker run --rm -it --env GH_TOKEN=$GH_TOKEN --env ELECTRON_CACHE=\"/root/.cache/electron\" --env ELECTRON_BUILDER_CACHE=\"/root/.cache/electron-builder\" -v ${PWD}:/project -v ~/.cache/electron:/root/.cache/electron -v ~/.cache/electron-builder:/root/.cache/electron-builder electronuserland/builder:wine sh -c \"electron-builder --project=dist -w -p never\"", "et": "et -m", "sign": "cd pack/mas; bash sign.sh" },