support portable for windows

This commit is contained in:
pompurin404 2024-08-14 16:38:40 +08:00
parent 7dfaceee05
commit f596888e12
No known key found for this signature in database
2 changed files with 11 additions and 5 deletions

View File

@ -49,14 +49,17 @@ jobs:
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: Windows ${{ matrix.arch }} name: Windows ${{ matrix.arch }}
path: dist/*.exe path: |
dist/*setup.exe
dist/*portable.7z
if-no-files-found: error if-no-files-found: error
- name: Publish Release - name: Publish Release
if: startsWith(github.ref, 'refs/tags/v') if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v2 uses: softprops/action-gh-release@v2
with: with:
files: | files: |
dist/*.exe dist/*setup.exe
dist/*portable.7z
dist/latest.yml dist/latest.yml
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}

View File

@ -25,11 +25,14 @@ protocols:
- 'clash' - 'clash'
- 'mihomo' - 'mihomo'
win: win:
target: nsis target:
- nsis
- 7z
artifactName: ${name}-windows-${version}-${arch}-portable.${ext}
requestedExecutionLevel: requireAdministrator requestedExecutionLevel: requireAdministrator
executableName: mihomo-party executableName: mihomo-party
artifactName: ${name}-windows-${version}-${arch}-setup.${ext}
nsis: nsis:
artifactName: ${name}-windows-${version}-${arch}-setup.${ext}
shortcutName: ${productName} shortcutName: ${productName}
uninstallDisplayName: ${productName} uninstallDisplayName: ${productName}
deleteAppDataOnUninstall: true deleteAppDataOnUninstall: true
@ -59,6 +62,6 @@ linux:
category: Utility category: Utility
artifactName: ${name}-linux-${version}-${arch}.${ext} artifactName: ${name}-linux-${version}-${arch}.${ext}
deb: deb:
afterInstall: "build/linux/deb/postinst" afterInstall: 'build/linux/deb/postinst'
npmRebuild: true npmRebuild: true
publish: [] publish: []