mirror of
https://github.com/A-Star100/simpliplay-desktop.git
synced 2025-09-17 22:29:38 +00:00
108 lines
2.8 KiB
YAML
108 lines
2.8 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] # Node.js version 22, required for Electron 35
|
|
include:
|
|
- os: ubuntu-latest
|
|
arch: x64
|
|
- os: ubuntu-latest
|
|
arch: arm64
|
|
- os: macos-latest
|
|
arch: universal # Separate matrix entry for macOS universal
|
|
- os: macos-latest
|
|
arch: x64
|
|
- os: macos-latest
|
|
arch: arm64
|
|
- os: windows-latest
|
|
arch: x64
|
|
- os: windows-latest
|
|
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
|
|
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 --win --macos --linux --x64 --arm64 --projectDir ./simpliplay
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: simpliplay-${{ 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
|
|
|
|
build-macos-universal:
|
|
needs: build
|
|
runs-on: macos-latest
|
|
strategy:
|
|
matrix:
|
|
node-version: [22]
|
|
|
|
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
|
|
|
|
- name: Build Electron app
|
|
run: npm run build
|
|
working-directory: ./simpliplay
|
|
|
|
- name: Package Electron app for macOS Universal
|
|
run: |
|
|
npx electron-builder --mac --arch universal --projectDir ./simpliplay
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Upload macOS Universal artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: simpliplay-macos-universal
|
|
path: simpliplay/dist/*.dmg
|
|
if-no-files-found: error
|