simpliplay-desktop/.github/workflows/compile-electron.yml
2025-02-03 16:44:03 +05:30

75 lines
2.0 KiB
YAML

name: Build SimpliPlay Electron
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node-version: [22] # Use an appropriate Node.js version
include:
- os: ubuntu-latest
target: AppImage
arch: x64
- os: ubuntu-latest
target: AppImage
arch: arm64
- os: macos-latest
target: dmg
arch: universal
- os: windows-latest
target: nsis
arch: x64
- os: windows-latest
target: msi
arch: x64
- os: windows-latest
target: msi
arch: arm64 # Replaces zip with MSI for ARM64
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm install
working-directory: ./simpliplay # Install dependencies in the correct directory
- name: Build Electron app
run: npm run build
working-directory: ./simpliplay # Build the app from the correct directory
- name: Package Electron app
run: |
npx electron-builder --${{ matrix.target }} --arch ${{ matrix.arch }} --projectDir ./simpliplay
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: Electron-App-${{ matrix.os }}-${{ matrix.arch }}
path: |
simpliplay/dist/*.AppImage
simpliplay/dist/*.dmg
simpliplay/dist/*.zip
simpliplay/dist/*.exe
simpliplay/dist/*.msi
if-no-files-found: error