Skip to content

Send files directly between devices over the internet - no cloud storage, no size limits.

Add windows portable build

Denis Lupookov3f7c022b540e
diff --git a/.github/workflows/release-desktop.yml b/.github/workflows/release-desktop.yml
index da45924..a94979b 100644
--- a/.github/workflows/release-desktop.yml
+++ b/.github/workflows/release-desktop.yml
@@ -122,29 +122,45 @@ jobs:
"WINDOWS_CERTIFICATE_FILE=$pfxPath" | Out-File -FilePath $env:GITHUB_ENV -Append
"WINDOWS_CERTIFICATE_PASSWORD=buildcert" | Out-File -FilePath $env:GITHUB_ENV -Append
- - name: Make Windows
+ - name: Make Windows installer + msix (Forge)
run: npm run dist:win:x64 -w apps/desktop
env:
DEBUG: electron-windows-msix*
+ - name: Make Windows portable (.exe)
+ run: npm run dist:win:portable:x64 -w apps/desktop
+
- name: List Windows make output (debug)
if: always()
shell: bash
run: |
- echo "=== files under apps/desktop/out/make ==="
- find apps/desktop/out/make -type f 2>/dev/null || echo "(no out/make dir)"
+ echo "=== Windows deliverables under apps/desktop/out ==="
+ find apps/desktop/out -type f \( -name '*.exe' -o -name '*.msix' -o -name '*.nupkg' -o -name 'RELEASES' \) 2>/dev/null || echo "(no out dir)"
+
+ - name: Upload Windows MSIX (unsigned)
+ id: upload-windows-msix
+ uses: actions/upload-artifact@v4
+ with:
+ name: windows-msix
+ path: apps/desktop/out/AlterSend-win32-*/**/*.msix
+
+ - name: Upload Windows Squirrel installer (unsigned)
+ id: upload-windows-squirrel
+ uses: actions/upload-artifact@v4
+ with:
+ name: windows-squirrel
+ path: apps/desktop/out/make/squirrel.windows/**/*
- - name: Upload Windows artifacts (unsigned)
- id: upload-windows-unsigned
+ - name: Upload Windows portable (unsigned)
+ id: upload-windows-portable
uses: actions/upload-artifact@v4
with:
- name: windows-unsigned
- path: |
- apps/desktop/out/make/squirrel.windows/**/*
- apps/desktop/out/AlterSend-win32-*/**/*.msix
+ name: windows-portable
+ path: apps/desktop/out/*-Portable-*.exe
# SignPath signing — only runs once `SIGNPATH_PROJECT_SLUG` repo variable is set.
- # See docs/SIGNING.md for application and setup instructions.
+ # Signs the Squirrel installer artifact. Signing the portable .exe / .msix
+ # needs additional SignPath signing requests once those are configured.
- name: Sign with SignPath
if: vars.SIGNPATH_PROJECT_SLUG != ''
uses: signpath/github-action-submit-signing-request@v1
@@ -154,7 +170,7 @@ jobs:
project-slug: ${{ vars.SIGNPATH_PROJECT_SLUG }}
signing-policy-slug: ${{ vars.SIGNPATH_SIGNING_POLICY_SLUG || 'release-signing' }}
artifact-configuration-slug: ${{ vars.SIGNPATH_ARTIFACT_CONFIGURATION_SLUG || 'windows-installer' }}
- github-artifact-id: ${{ steps.upload-windows-unsigned.outputs.artifact-id }}
+ github-artifact-id: ${{ steps.upload-windows-squirrel.outputs.artifact-id }}
wait-for-completion: true
output-artifact-directory: signed-windows
@@ -255,6 +271,7 @@ jobs:
files: |
artifacts/**/*.dmg
artifacts/**/*.exe
+ artifacts/**/*.msix
artifacts/**/*.AppImage
artifacts/**/*.apk
diff --git a/apps/desktop/electron-builder.win.json b/apps/desktop/electron-builder.win.json
new file mode 100644
index 0000000..5108413
--- /dev/null
+++ b/apps/desktop/electron-builder.win.json
@@ -0,0 +1,33 @@
+{
+ "appId": "com.altersend.desktop",
+ "electronVersion": "40.2.1",
+ "icon": "build/icon.ico",
+ "asar": false,
+ "directories": {
+ "output": "out"
+ },
+ "files": [
+ "dist/**/*",
+ "package.json",
+ "!dist/**/*.map",
+ "!**/node_modules/react-native/**",
+ "!**/node_modules/react-native-*/**",
+ "!**/node_modules/@react-native/**",
+ "!**/node_modules/@expo/**",
+ "!**/node_modules/expo-*/**",
+ "!**/node_modules/metro*/**",
+ "!**/node_modules/jest*/**",
+ "!**/node_modules/@jest/**",
+ "!**/node_modules/@babel/**",
+ "!**/node_modules/babel-*/**"
+ ],
+ "win": {
+ "icon": "build/icon.ico",
+ "target": ["portable"],
+ "artifactName": "${productName}-${version}-Portable-${arch}.${ext}"
+ },
+ "portable": {
+ "artifactName": "${productName}-${version}-Portable-${arch}.${ext}"
+ },
+ "afterPack": "scripts/afterPack.cjs"
+}
diff --git a/apps/desktop/package.json b/apps/desktop/package.json
index 5591c01..f3028af 100644
--- a/apps/desktop/package.json
+++ b/apps/desktop/package.json
@@ -24,6 +24,8 @@
"dist:mac:x64:dev": "SKIP_NOTARIZE=true CSC_IDENTITY_AUTO_DISCOVERY=false npm run dist:mac:x64",
"dist:win:x64": "electron-forge make --platform=win32 --arch=x64",
"dist:win:arm64": "electron-forge make --platform=win32 --arch=arm64",
+ "dist:win:portable:x64": "npx electron-builder --win --x64 -c electron-builder.win.json --publish never",
+ "dist:win:portable:arm64": "npx electron-builder --win --arm64 -c electron-builder.win.json --publish never",
"dist:linux:x64": "npx electron-builder --linux --x64 -c electron-builder.linux.json --publish never",
"dist:linux:arm64": "npx electron-builder --linux --arm64 -c electron-builder.linux.json --publish never",
"pear:build:darwin:arm64": "npx pear-build --package=./package.json --darwin-arm64-app ./out/mac-arm64/AlterSend.app --target ../../../altersend-desktop-$npm_package_version",