Skip to content

Build & Package

Build & Package #1

Workflow file for this run

name: Build & Package
on:
workflow_dispatch:
inputs:
platform:
description: "Target platform"
required: true
default: "all"
type: choice
options:
- all
- windows
- macos
- linux
push:
tags:
- "v*"
jobs:
build-windows:
if: ${{ github.event_name == 'push' || inputs.platform == 'all' || inputs.platform == 'windows' }}
runs-on: windows-latest
strategy:
matrix:
arch: [x64, arm64]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci
- name: Build Electron app
run: npm run electron:build
- name: Package for Windows (${{ matrix.arch }})
run: npx electron-builder --win --${{ matrix.arch }} --config electron-builder.yml
- name: Upload Windows artifacts
uses: actions/upload-artifact@v4
with:
name: windows-${{ matrix.arch }}
path: |
release/*.exe
release/*.zip
if-no-files-found: warn
build-macos:
if: ${{ github.event_name == 'push' || inputs.platform == 'all' || inputs.platform == 'macos' }}
runs-on: macos-latest
strategy:
matrix:
arch: [x64, arm64]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci
- name: Build Electron app
run: npm run electron:build
- name: Package for macOS (${{ matrix.arch }})
run: npx electron-builder --mac --${{ matrix.arch }} --config electron-builder.yml
- name: Upload macOS artifacts
uses: actions/upload-artifact@v4
with:
name: macos-${{ matrix.arch }}
path: release/*.dmg
if-no-files-found: warn
build-linux:
if: ${{ github.event_name == 'push' || inputs.platform == 'all' || inputs.platform == 'linux' }}
runs-on: ubuntu-latest
strategy:
matrix:
arch: [x64, arm64]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci
- name: Build Electron app
run: npm run electron:build
- name: Package for Linux (${{ matrix.arch }})
run: npx electron-builder --linux --${{ matrix.arch }} --config electron-builder.yml
- name: Upload Linux artifacts
uses: actions/upload-artifact@v4
with:
name: linux-${{ matrix.arch }}
path: |
release/*.AppImage
release/*.deb
release/*.rpm
if-no-files-found: warn