wip #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | | |
npx electron-builder --${{ matrix.platform }} -p never build | |
ls -la /home/runner/.cache | |
#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" |