mirror of
https://github.com/webadderallorg/Recordly.git
synced 2026-09-26 07:45:34 +00:00
140 lines
4.2 KiB
YAML
140 lines
4.2 KiB
YAML
|
|
name: Build Electron App
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-windows:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '22'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci --ignore-scripts
|
|
|
|
- name: Install bundled FFmpeg binary
|
|
run: node node_modules/ffmpeg-static/install.js
|
|
|
|
- name: Verify bundled FFmpeg binary
|
|
run: |
|
|
node -e "const fs=require('node:fs'); const ffmpeg=require('ffmpeg-static'); if (typeof ffmpeg !== 'string' || !fs.existsSync(ffmpeg)) { throw new Error('Bundled ffmpeg-static binary is missing: ' + ffmpeg); } console.log('Using bundled ffmpeg binary: ' + ffmpeg);"
|
|
|
|
- name: Install app dependencies
|
|
run: npx electron-builder install-app-deps
|
|
|
|
- name: Build Windows app
|
|
shell: pwsh
|
|
run: |
|
|
npm run build:platform-native-helpers
|
|
npx tsc
|
|
npx vite build
|
|
npx electron-builder --win nsis --x64 --publish never
|
|
|
|
- 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@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '22'
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci --ignore-scripts
|
|
|
|
- name: Install bundled FFmpeg binary
|
|
run: node node_modules/ffmpeg-static/install.js
|
|
|
|
- name: Verify bundled FFmpeg binary
|
|
run: |
|
|
node -e "const fs=require('node:fs'); const ffmpeg=require('ffmpeg-static'); if (typeof ffmpeg !== 'string' || !fs.existsSync(ffmpeg)) { throw new Error('Bundled ffmpeg-static binary is missing: ' + ffmpeg); } console.log('Using bundled ffmpeg binary: ' + ffmpeg);"
|
|
|
|
- name: Install app dependencies
|
|
run: npx electron-builder install-app-deps
|
|
|
|
- name: Build macOS app
|
|
run: |
|
|
npm run build:platform-native-helpers
|
|
npx tsc
|
|
npx vite build
|
|
npx electron-builder --mac dmg zip --publish never
|
|
|
|
- name: Upload macOS build
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: macos-installer
|
|
path: |
|
|
release/**/*.dmg
|
|
release/**/*.zip
|
|
release/latest-mac.yml
|
|
retention-days: 30
|
|
|
|
build-linux:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '22'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci --ignore-scripts
|
|
|
|
- name: Install bundled FFmpeg binary
|
|
run: node node_modules/ffmpeg-static/install.js
|
|
|
|
- name: Verify bundled FFmpeg binary
|
|
run: |
|
|
node -e "const fs=require('node:fs'); const ffmpeg=require('ffmpeg-static'); if (typeof ffmpeg !== 'string' || !fs.existsSync(ffmpeg)) { throw new Error('Bundled ffmpeg-static binary is missing: ' + ffmpeg); } console.log('Using bundled ffmpeg binary: ' + ffmpeg);"
|
|
|
|
- name: Install Linux native build dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libx11-dev libxt-dev libxtst-dev libxkbfile-dev libxi-dev libxrandr-dev libxinerama-dev
|
|
|
|
- name: Remove stale uiohook build output
|
|
run: rm -rf node_modules/uiohook-napi/build
|
|
|
|
- name: Install app dependencies
|
|
run: npx electron-builder install-app-deps
|
|
|
|
- name: Build Linux app
|
|
run: |
|
|
npm run build:platform-native-helpers
|
|
npx tsc
|
|
npx vite build
|
|
npx electron-builder --linux AppImage --x64 --publish never
|
|
|
|
- name: Upload Linux build
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: linux-installer
|
|
path: |
|
|
release/**/*.AppImage
|
|
release/latest-linux.yml
|
|
retention-days: 30
|