Skip to content

wip

wip #17

Workflow file for this run

name: Build
on:
pull_request:
branches: [master, develop]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
platform: [linux, windows, macos]
include:
- platform: linux
os: ubuntu-latest
target: dmg,zip
- platform: windows
os: ubuntu-latest
target: msi
- platform: macos
os: macos
target: AppImage,snap
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Cache Node Modules
id: node-cache
uses: actions/cache@v3
with:
path: |
node_modules
.yarn/cache
key: node-modules-${{ hashFiles('yarn.lock') }}
- name: Install wine
if: ${{ matrix.platform == 'windows' }}
run: |
sudo dpkg --add-architecture i386
wget -nc https://dl.winehq.org/wine-builds/winehq.key
sudo apt-key add winehq.key
sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main'
sudo apt-get update
sudo apt install -y winehq-stable
- name: Build
env:
PLATFORM: ${{ matrix.platform }}
run: |
export ELECTRON_CACHE=$HOME/.cache/electron
export ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
npx electron-builder --${{ matrix.platform }} -p never build
#npx electron-builder build
#docker run --rm \
# -e CI=${CI} \
# -v ${PWD}:/src \
# -v ~/.cache/electron:/root/.cache/electron \
# -v ~/.cache/electron-builder:/root/.cache/electron-builder \
# -w /src \
# electronuserland/builder:14-wine-05.22 \
# /bin/bash -c "yarn --link-duplicates --pure-lockfile --ignore-engines install && npx electron-builder -p never build"
fi
fi