Skip to content

Fix electron builds on macos-latest #53

Fix electron builds on macos-latest

Fix electron builds on macos-latest #53

name: Build and Publish Electron GUI
on:
push:
tags:
- "deemix-gui@*"
pull_request:
branches:
- main
paths:
- gui/**
concurrency: ${{ github.workflow }}-${{ github.ref }}
env:
HUSKY: 0
jobs:
build-release-electron:
runs-on: ${{ matrix.os }}
permissions:
contents: write
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: Cache turbo
uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install distutils
run: |
python -m pip install --upgrade pip
pip install setuptools
- name: Set PYTHON env var
run: echo "PYTHON=$(which python)" >> $GITHUB_ENV
- run: pnpm install --frozen-lockfile
- name: Rebuild Electron modules
run: |
cd gui
npx rebuild
npx electron-rebuild
if: matrix.os == 'macos-latest'
- name: Build and package
run: |
if [ "${{ matrix.os }}" == "macos-latest" ]; then
pnpm make -- --arch=x64 --verbose
else
pnpm make --verbose
fi
shell: bash
- name: Upload Artifacts
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
gui/out/**/Deemix-*-arm64.dmg
gui/out/**/Deemix.exe
gui/out/**/Deemix*Setup.exe
gui/out/**/deemix-gui*.deb
gui/out/**/deemix-gui*.rpm