From f596888e12a4dc8b9528deb5190b4ac4e3a00d87 Mon Sep 17 00:00:00 2001 From: pompurin404 Date: Wed, 14 Aug 2024 16:38:40 +0800 Subject: [PATCH] support portable for windows --- .github/workflows/build.yml | 7 +++++-- electron-builder.yml | 9 ++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 11ef17a..a5398de 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -49,14 +49,17 @@ jobs: uses: actions/upload-artifact@v4 with: name: Windows ${{ matrix.arch }} - path: dist/*.exe + path: | + dist/*setup.exe + dist/*portable.7z if-no-files-found: error - name: Publish Release if: startsWith(github.ref, 'refs/tags/v') uses: softprops/action-gh-release@v2 with: files: | - dist/*.exe + dist/*setup.exe + dist/*portable.7z dist/latest.yml token: ${{ secrets.GITHUB_TOKEN }} diff --git a/electron-builder.yml b/electron-builder.yml index a7b5f46..21f0a56 100644 --- a/electron-builder.yml +++ b/electron-builder.yml @@ -25,11 +25,14 @@ protocols: - 'clash' - 'mihomo' win: - target: nsis + target: + - nsis + - 7z + artifactName: ${name}-windows-${version}-${arch}-portable.${ext} requestedExecutionLevel: requireAdministrator executableName: mihomo-party - artifactName: ${name}-windows-${version}-${arch}-setup.${ext} nsis: + artifactName: ${name}-windows-${version}-${arch}-setup.${ext} shortcutName: ${productName} uninstallDisplayName: ${productName} deleteAppDataOnUninstall: true @@ -59,6 +62,6 @@ linux: category: Utility artifactName: ${name}-linux-${version}-${arch}.${ext} deb: - afterInstall: "build/linux/deb/postinst" + afterInstall: 'build/linux/deb/postinst' npmRebuild: true publish: []