From 08d42c416918400ff1c33ff0ceb9ef330741c7ea Mon Sep 17 00:00:00 2001 From: YuShifan <894402575bt@gmail.com> Date: Thu, 9 Nov 2023 11:38:35 +0800 Subject: [PATCH 01/11] fix(ci): update electron-builder.yml --- apps/desktop/electron-builder.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/desktop/electron-builder.yml b/apps/desktop/electron-builder.yml index 4d9fca8b0..dafcd3963 100644 --- a/apps/desktop/electron-builder.yml +++ b/apps/desktop/electron-builder.yml @@ -14,7 +14,7 @@ asarUnpack: win: executableName: MQTTX nsis: - artifactName: ${name}-${version}-setup.${ext} + artifactName: ${productName}-${version}-setup.${ext} shortcutName: ${productName} uninstallDisplayName: ${productName} createDesktopShortcut: always @@ -27,7 +27,7 @@ mac: - NSDownloadsFolderUsageDescription: Application requests access to the user's Downloads folder. notarize: false dmg: - artifactName: ${name}-${version}.${ext} + artifactName: ${productName}-${version}.${ext} linux: target: - AppImage @@ -37,7 +37,8 @@ linux: maintainer: electronjs.org category: Utility appImage: - artifactName: ${name}-${version}.${ext} + executableName: desiredName + artifactName: ${productName}-${version}.${ext} npmRebuild: false publish: provider: generic From d5dba6519a1d94fe770d89fb7cbf1b0abac14ea7 Mon Sep 17 00:00:00 2001 From: YuShifan <894402575bt@gmail.com> Date: Thu, 9 Nov 2023 11:39:21 +0800 Subject: [PATCH 02/11] docs(readme): update pnpm commands --- apps/desktop/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/desktop/README.md b/apps/desktop/README.md index 1d9b8aa81..c993c689c 100644 --- a/apps/desktop/README.md +++ b/apps/desktop/README.md @@ -11,13 +11,13 @@ An Electron application with Vue and TypeScript ### Install ```bash -$ pnpm install +pnpm install ``` ### Development ```bash -$ pnpm dev +pnpm dev ``` ### Build From 316bff9929f49fc43888337dd18927d9c1887999 Mon Sep 17 00:00:00 2001 From: YuShifan <894402575bt@gmail.com> Date: Thu, 9 Nov 2023 11:43:06 +0800 Subject: [PATCH 03/11] fix(ci): update electron-builder.yml --- apps/desktop/electron-builder.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/desktop/electron-builder.yml b/apps/desktop/electron-builder.yml index dafcd3963..dba255071 100644 --- a/apps/desktop/electron-builder.yml +++ b/apps/desktop/electron-builder.yml @@ -37,7 +37,6 @@ linux: maintainer: electronjs.org category: Utility appImage: - executableName: desiredName artifactName: ${productName}-${version}.${ext} npmRebuild: false publish: From 4d12b46e52fa929ce1809b2b93199da3ccb9f8b4 Mon Sep 17 00:00:00 2001 From: YuShifan <894402575bt@gmail.com> Date: Fri, 10 Nov 2023 15:23:22 +0800 Subject: [PATCH 04/11] fix(ci): update build desktop ci and config --- .github/workflows/build_desktop.yaml | 2 +- apps/desktop/electron-builder.yml | 42 +++++++++++++++++++--------- 2 files changed, 30 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build_desktop.yaml b/.github/workflows/build_desktop.yaml index 610f493c4..823beced0 100644 --- a/.github/workflows/build_desktop.yaml +++ b/.github/workflows/build_desktop.yaml @@ -72,7 +72,7 @@ jobs: # dist/*.yml # dist/*.blockmap # env: - # GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # jobs: # build: # runs-on: ubuntu-20.04 diff --git a/apps/desktop/electron-builder.yml b/apps/desktop/electron-builder.yml index dba255071..81887e477 100644 --- a/apps/desktop/electron-builder.yml +++ b/apps/desktop/electron-builder.yml @@ -13,11 +13,18 @@ asarUnpack: - resources/** win: executableName: MQTTX -nsis: - artifactName: ${productName}-${version}-setup.${ext} - shortcutName: ${productName} - uninstallDisplayName: ${productName} - createDesktopShortcut: always + target: + - target: nsis + arch: [x64, ia32, arm64] + nsis: + oneClick: false + allowElevation: true + allowToChangeInstallationDirectory: true + createStartMenuShortcut: true + artifactName: ${productName}-Setup-${version}-{arch}.${ext} + shortcutName: ${productName} + uninstallDisplayName: ${productName} + createDesktopShortcut: always mac: entitlementsInherit: build/entitlements.mac.plist extendInfo: @@ -26,18 +33,27 @@ mac: - NSDocumentsFolderUsageDescription: Application requests access to the user's Documents folder. - NSDownloadsFolderUsageDescription: Application requests access to the user's Downloads folder. notarize: false -dmg: - artifactName: ${productName}-${version}.${ext} + target: + - target: dmg + arch: [x64, arm64] + - target: pkg + arch: [x64, arm64] + - target: zip + arch: [x64, arm64] + artifactName: ${productName}-${version}-{arch}.${ext} linux: target: - - AppImage - - snap - - deb - - rpm + - target: AppImage + arch: [x64, arm64] + - target: deb + arch: [x64, arm64] + - target: rpm + arch: [x64, arm64] + - target: snap + arch: [x64] maintainer: electronjs.org category: Utility -appImage: - artifactName: ${productName}-${version}.${ext} + artifactName: ${productName}-${version}-{arch}.${ext} npmRebuild: false publish: provider: generic From 361d2c8b07bfcf990300e327a027b1fd1f30e6ca Mon Sep 17 00:00:00 2001 From: YuShifan <894402575bt@gmail.com> Date: Fri, 10 Nov 2023 15:25:04 +0800 Subject: [PATCH 05/11] fix(ci): try to build linux first --- .github/workflows/build_desktop.yaml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build_desktop.yaml b/.github/workflows/build_desktop.yaml index 823beced0..7d9ad8f3b 100644 --- a/.github/workflows/build_desktop.yaml +++ b/.github/workflows/build_desktop.yaml @@ -17,7 +17,8 @@ jobs: strategy: matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + # os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest] steps: - name: Check out Git repository @@ -48,13 +49,13 @@ jobs: if: matrix.os == 'ubuntu-latest' run: pnpm run build:linux - - name: Build macOS - if: matrix.os == 'macos-latest' - run: pnpm run build:mac + # - name: Build macOS + # if: matrix.os == 'macos-latest' + # run: pnpm run build:mac - - name: Build Win - if: matrix.os == 'windows-latest' - run: pnpm run build:win + # - name: Build Win + # if: matrix.os == 'windows-latest' + # run: pnpm run build:win # - name: release # uses: softprops/action-gh-release@v1 From 789e47cd6ed23de000edcb3a9fab6c42d4bfec58 Mon Sep 17 00:00:00 2001 From: YuShifan <894402575bt@gmail.com> Date: Fri, 10 Nov 2023 15:27:35 +0800 Subject: [PATCH 06/11] fix(ci): add executable name --- apps/desktop/electron-builder.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/desktop/electron-builder.yml b/apps/desktop/electron-builder.yml index 81887e477..b07e82890 100644 --- a/apps/desktop/electron-builder.yml +++ b/apps/desktop/electron-builder.yml @@ -12,7 +12,7 @@ files: asarUnpack: - resources/** win: - executableName: MQTTX + executableName: ${productName} target: - target: nsis arch: [x64, ia32, arm64] @@ -42,6 +42,7 @@ mac: arch: [x64, arm64] artifactName: ${productName}-${version}-{arch}.${ext} linux: + executableName: ${productName} target: - target: AppImage arch: [x64, arm64] From 57fbcf8381e642dab3ea3f15c70b702044a7d976 Mon Sep 17 00:00:00 2001 From: YuShifan <894402575bt@gmail.com> Date: Fri, 10 Nov 2023 15:30:39 +0800 Subject: [PATCH 07/11] fix(ci): try to build linux first --- apps/desktop/electron-builder.yml | 63 ++++++++++++++++--------------- 1 file changed, 33 insertions(+), 30 deletions(-) diff --git a/apps/desktop/electron-builder.yml b/apps/desktop/electron-builder.yml index b07e82890..f28e209a7 100644 --- a/apps/desktop/electron-builder.yml +++ b/apps/desktop/electron-builder.yml @@ -11,36 +11,39 @@ files: - '!{tsconfig.json,tsconfig.node.json,tsconfig.web.json}' asarUnpack: - resources/** -win: - executableName: ${productName} - target: - - target: nsis - arch: [x64, ia32, arm64] - nsis: - oneClick: false - allowElevation: true - allowToChangeInstallationDirectory: true - createStartMenuShortcut: true - artifactName: ${productName}-Setup-${version}-{arch}.${ext} - shortcutName: ${productName} - uninstallDisplayName: ${productName} - createDesktopShortcut: always -mac: - entitlementsInherit: build/entitlements.mac.plist - extendInfo: - - NSCameraUsageDescription: Application requests access to the device's camera. - - NSMicrophoneUsageDescription: Application requests access to the device's microphone. - - NSDocumentsFolderUsageDescription: Application requests access to the user's Documents folder. - - NSDownloadsFolderUsageDescription: Application requests access to the user's Downloads folder. - notarize: false - target: - - target: dmg - arch: [x64, arm64] - - target: pkg - arch: [x64, arm64] - - target: zip - arch: [x64, arm64] - artifactName: ${productName}-${version}-{arch}.${ext} +# win: +# executableName: ${productName} +# artifactName: ${productName}-Setup-${version}-{arch}.${ext} +# target: +# - target: nsis +# arch: [x64, ia32, arm64] + +# nsis: +# oneClick: false +# allowElevation: true +# allowToChangeInstallationDirectory: true +# createStartMenuShortcut: true +# shortcutName: ${productName} +# uninstallDisplayName: ${productName} +# createDesktopShortcut: always + +# mac: +# entitlementsInherit: build/entitlements.mac.plist +# extendInfo: +# - NSCameraUsageDescription: Application requests access to the device's camera. +# - NSMicrophoneUsageDescription: Application requests access to the device's microphone. +# - NSDocumentsFolderUsageDescription: Application requests access to the user's Documents folder. +# - NSDownloadsFolderUsageDescription: Application requests access to the user's Downloads folder. +# notarize: false +# target: +# - target: dmg +# arch: [x64, arm64] +# - target: pkg +# arch: [x64, arm64] +# - target: zip +# arch: [x64, arm64] +# artifactName: ${productName}-${version}-{arch}.${ext} + linux: executableName: ${productName} target: From af69beee9a57aaa43e68312a7bcdd2611238714f Mon Sep 17 00:00:00 2001 From: YuShifan <894402575bt@gmail.com> Date: Fri, 10 Nov 2023 15:52:41 +0800 Subject: [PATCH 08/11] fix(ci): remove rpm temp --- .github/workflows/build_desktop.yaml | 29 ---------------------------- apps/desktop/electron-builder.yml | 8 +++----- 2 files changed, 3 insertions(+), 34 deletions(-) diff --git a/.github/workflows/build_desktop.yaml b/.github/workflows/build_desktop.yaml index 7d9ad8f3b..a0529874f 100644 --- a/.github/workflows/build_desktop.yaml +++ b/.github/workflows/build_desktop.yaml @@ -74,35 +74,6 @@ jobs: # dist/*.blockmap # env: # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# jobs: -# build: -# runs-on: ubuntu-20.04 -# steps: -# - uses: actions/checkout@v3 - -# - name: Set up Node.js -# uses: actions/setup-node@v3 -# with: -# node-version: '18.17' - -# - name: use pnpm -# uses: pnpm/action-setup@v2 -# with: -# version: 8 - -# - name: Cache pnpm modules -# uses: actions/cache@v3 -# with: -# path: ~/.pnpm-store -# key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} -# restore-keys: | -# ${{ runner.os }}-pnpm- - -# - name: Install dependencies -# run: pnpm install - -# - name: Build Win and Linux packages -# run: pnpm run build:win && pnpm run build:linux # steps: # - uses: actions/checkout@v3 # - name: build diff --git a/apps/desktop/electron-builder.yml b/apps/desktop/electron-builder.yml index f28e209a7..7d5a2cc2b 100644 --- a/apps/desktop/electron-builder.yml +++ b/apps/desktop/electron-builder.yml @@ -51,14 +51,12 @@ linux: arch: [x64, arm64] - target: deb arch: [x64, arm64] - - target: rpm - arch: [x64, arm64] - target: snap arch: [x64] maintainer: electronjs.org category: Utility artifactName: ${productName}-${version}-{arch}.${ext} npmRebuild: false -publish: - provider: generic - url: https://example.com/auto-updates +# publish: +# provider: generic +# url: https://example.com/auto-updates From 20d2b89ae909bc9e7d6564a293a8ba65b1a3ddad Mon Sep 17 00:00:00 2001 From: YuShifan <894402575bt@gmail.com> Date: Fri, 10 Nov 2023 16:04:48 +0800 Subject: [PATCH 09/11] fix(ci): update artifact names --- .github/workflows/build_desktop.yaml | 2 +- apps/desktop/electron-builder.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_desktop.yaml b/.github/workflows/build_desktop.yaml index a0529874f..ba7f84ba6 100644 --- a/.github/workflows/build_desktop.yaml +++ b/.github/workflows/build_desktop.yaml @@ -47,7 +47,7 @@ jobs: - name: Build Linux if: matrix.os == 'ubuntu-latest' - run: pnpm run build:linux + run: pnpm run build:linux && ls -l apps/desktop/dist # - name: Build macOS # if: matrix.os == 'macos-latest' diff --git a/apps/desktop/electron-builder.yml b/apps/desktop/electron-builder.yml index 7d5a2cc2b..e0bad3797 100644 --- a/apps/desktop/electron-builder.yml +++ b/apps/desktop/electron-builder.yml @@ -13,7 +13,7 @@ asarUnpack: - resources/** # win: # executableName: ${productName} -# artifactName: ${productName}-Setup-${version}-{arch}.${ext} +# artifactName: ${productName}-Setup-${version}-${arch}.${ext} # target: # - target: nsis # arch: [x64, ia32, arm64] @@ -42,10 +42,11 @@ asarUnpack: # arch: [x64, arm64] # - target: zip # arch: [x64, arm64] -# artifactName: ${productName}-${version}-{arch}.${ext} +# artifactName: ${productName}-${version}-${arch}.${ext} linux: executableName: ${productName} + artifactName: ${productName}-${version}-${arch}.${ext} target: - target: AppImage arch: [x64, arm64] @@ -55,7 +56,6 @@ linux: arch: [x64] maintainer: electronjs.org category: Utility - artifactName: ${productName}-${version}-{arch}.${ext} npmRebuild: false # publish: # provider: generic From 4afc50da17e578c511dce0f16f6ef0676ead8148 Mon Sep 17 00:00:00 2001 From: YuShifan <894402575bt@gmail.com> Date: Fri, 10 Nov 2023 16:10:49 +0800 Subject: [PATCH 10/11] fix(ci): update snap arm64 support --- apps/desktop/electron-builder.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/desktop/electron-builder.yml b/apps/desktop/electron-builder.yml index e0bad3797..77400ae9c 100644 --- a/apps/desktop/electron-builder.yml +++ b/apps/desktop/electron-builder.yml @@ -11,13 +11,13 @@ files: - '!{tsconfig.json,tsconfig.node.json,tsconfig.web.json}' asarUnpack: - resources/** + # win: # executableName: ${productName} # artifactName: ${productName}-Setup-${version}-${arch}.${ext} # target: # - target: nsis # arch: [x64, ia32, arm64] - # nsis: # oneClick: false # allowElevation: true @@ -53,7 +53,7 @@ linux: - target: deb arch: [x64, arm64] - target: snap - arch: [x64] + arch: [x64, arm64] maintainer: electronjs.org category: Utility npmRebuild: false From d868bffafa6387d03af859b2a51e275b2675ff06 Mon Sep 17 00:00:00 2001 From: YuShifan <894402575bt@gmail.com> Date: Fri, 10 Nov 2023 16:19:40 +0800 Subject: [PATCH 11/11] fix(ci): update build process for Linux --- .github/workflows/build_desktop.yaml | 2 +- apps/desktop/electron-builder.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_desktop.yaml b/.github/workflows/build_desktop.yaml index ba7f84ba6..a0529874f 100644 --- a/.github/workflows/build_desktop.yaml +++ b/.github/workflows/build_desktop.yaml @@ -47,7 +47,7 @@ jobs: - name: Build Linux if: matrix.os == 'ubuntu-latest' - run: pnpm run build:linux && ls -l apps/desktop/dist + run: pnpm run build:linux # - name: Build macOS # if: matrix.os == 'macos-latest' diff --git a/apps/desktop/electron-builder.yml b/apps/desktop/electron-builder.yml index 77400ae9c..8ffec194e 100644 --- a/apps/desktop/electron-builder.yml +++ b/apps/desktop/electron-builder.yml @@ -53,7 +53,7 @@ linux: - target: deb arch: [x64, arm64] - target: snap - arch: [x64, arm64] + arch: [x64] maintainer: electronjs.org category: Utility npmRebuild: false