Create compile-electron.yml

This commit is contained in:
Anirudh Sevugan 2025-02-03 16:21:29 +05:30 committed by GitHub
parent d97b85e161
commit cd45e349ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

69
.github/workflows/compile-electron.yml vendored Normal file
View File

@ -0,0 +1,69 @@
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: nsis
arch: 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
- name: Build Electron app
run: npm run build
- name: Package Electron app
run: |
npx electron-builder --${{ matrix.target }} --arch ${{ matrix.arch }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: simpliplay-${{ matrix.os }}-${{ matrix.arch }}
path: |
dist/*.AppImage
dist/*.dmg
dist/*.zip
dist/*.exe
dist/*.msi
if-no-files-found: error