Skip to content

Create polished demo videos without editing skills. Mac/Windows/Linux

test actions

Siddharth54ec8c118d0c
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 00000000..28350996
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,71 @@
+name: Build Electron App
+
+on:
+ push:
+ branches: [ main, master ]
+ workflow_dispatch:
+
+jobs:
+ build-windows:
+ runs-on: windows-latest
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v3
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v3
+ with:
+ node-version: '22'
+
+ - name: Install dependencies
+ run: npm ci
+
+ - name: Install app dependencies
+ run: npx electron-builder install-app-deps
+
+ - name: Build Windows app
+ run: npm run build:win
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Upload Windows build
+ uses: actions/upload-artifact@v4
+ with:
+ name: windows-installer
+ path: release/**/*.exe
+ retention-days: 30
+
+ build-macos:
+ runs-on: macos-latest
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v3
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v3
+ with:
+ node-version: '22'
+
+ - name: Setup Python
+ uses: actions/setup-python@v4
+ with:
+ python-version: '3.11'
+
+ - name: Install dependencies
+ run: npm ci
+
+ - name: Install app dependencies
+ run: npx electron-builder install-app-deps
+
+ - name: Build macOS app
+ run: npm run build:mac
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Upload macOS build
+ uses: actions/upload-artifact@v4
+ with:
+ name: macos-installer
+ path: release/**/*.dmg
+ retention-days: 30
+
diff --git a/electron-builder.json5 b/electron-builder.json5
index 4bc5150c..75c490b8 100644
--- a/electron-builder.json5
+++ b/electron-builder.json5
@@ -39,5 +39,10 @@
"AppImage"
],
"artifactName": "${productName}-Linux-${version}.${ext}"
+ },
+ "win": {
+ "target": [
+ "nsis"
+ ]
}
}
diff --git a/package.json b/package.json
index 84dc6fcf..6f6568fd 100644
--- a/package.json
+++ b/package.json
@@ -8,7 +8,8 @@
"build": "tsc && vite build && electron-builder",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",
- "build:mac": "tsc && vite build && electron-builder --mac"
+ "build:mac": "tsc && vite build && electron-builder --mac",
+ "build:win": "tsc && vite build && electron-builder --win"
},
"dependencies": {
"@fix-webm-duration/fix": "^1.0.1",
@@ -57,4 +58,4 @@
"vite-plugin-electron-renderer": "^0.14.5"
},
"main": "dist-electron/main.js"
-}
+}
\ No newline at end of file