Skip to content

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

workflow testing for win

Siddharth9cecc9131ea2
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 00000000..2af24d4b
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,55 @@
+name: Build Electron App
+
+on:
+ push:
+ branches: [ main, master ]
+ workflow_dispatch: # Allows you to manually trigger from GitHub UI
+
+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: '18'
+
+ - name: Install dependencies
+ run: npm ci
+
+ - name: Build Windows app
+ run: npm run build:win
+
+ - name: Upload Windows build
+ uses: actions/upload-artifact@v3
+ with:
+ name: windows-installer
+ path: dist/*.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: '18'
+
+ - name: Install dependencies
+ run: npm ci
+
+ - name: Build macOS app
+ run: npm run build:mac
+
+ - name: Upload macOS build
+ uses: actions/upload-artifact@v3
+ with:
+ name: macos-installer
+ path: dist/*.dmg
+ retention-days: 30
\ No newline at end of file
diff --git a/electron-builder.json5 b/electron-builder.json5
index 327778bf..2776b200 100644
--- a/electron-builder.json5
+++ b/electron-builder.json5
@@ -4,6 +4,8 @@
"appId": "com.siddharthvaddem.openscreen",
"asar": true,
"productName": "Openscreen",
+ "npmRebuild": true,
+ "buildDependenciesFromSource": true,
"directories": {
"output": "release/${version}"
},
diff --git a/package.json b/package.json
index 24377b9b..45ad7c65 100644
--- a/package.json
+++ b/package.json
@@ -7,7 +7,11 @@
"dev": "vite",
"build": "tsc && vite build && electron-builder",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
- "preview": "vite preview"
+ "preview": "vite preview",
+ "postinstall": "electron-builder install-app-deps",
+ "build:mac": "electron-builder --mac",
+ "build:win": "electron-builder --win --x64"
+
},
"dependencies": {
"@fix-webm-duration/fix": "^1.0.1",