mirror of
https://github.com/A-Star100/simpliplay-desktop.git
synced 2025-09-17 22:29:38 +00:00
Create compile-electron.yml
This commit is contained in:
parent
d97b85e161
commit
cd45e349ae
69
.github/workflows/compile-electron.yml
vendored
Normal file
69
.github/workflows/compile-electron.yml
vendored
Normal 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
|
Loading…
Reference in New Issue
Block a user