Skip to content

build

build #2

Workflow file for this run

name: Build Executables
on:
push:
branches:
- main
tags:
- 'v*'
workflow_dispatch:

Check failure on line 10 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build.yml

Invalid workflow file

You have an error in your yaml syntax on line 10
permissions:
contents: write
jobs:
build:
strategy:
matrix:
include:
# ── Editor ───────────────────────────────────────────────────────
- os: windows-latest
script: MCE.OLED.EDITOR.py
asset_name: MCE-OLED-Editor-Windows.exe
output: dist/MCE.OLED.EDITOR.exe
pyinstaller_flags: '--add-data "gcmcepr.png;." --icon="edit.ico"'
- os: ubuntu-latest
script: MCE.OLED.EDITOR.py
asset_name: MCE-OLED-Editor-Linux
output: dist/MCE.OLED.EDITOR
pyinstaller_flags: '--add-data "gcmcepr.png:."'
- os: macos-latest
script: MCE.OLED.EDITOR.py
asset_name: MCE-OLED-Editor-macOS.zip
output: dist/MCE.OLED.EDITOR.app
pyinstaller_flags: '--add-data "gcmcepr.png:."'
# ── Gallery ───────────────────────────────────────────────────────
- os: windows-latest
script: MCE.OLED.GALLERY.py
asset_name: MCE-OLED-Gallery-Windows.exe
output: dist/MCE.OLED.GALLERY.exe
pyinstaller_flags: '--add-data "gcmcepr.png;." --add-data "database.json;." --icon="gallr.ico"'
- os: ubuntu-latest
script: MCE.OLED.GALLERY.py
asset_name: MCE-OLED-Gallery-Linux
output: dist/MCE.OLED.GALLERY
pyinstaller_flags: '--add-data "gcmcepr.png:." --add-data "database.json:."'
- os: macos-latest
script: MCE.OLED.GALLERY.py
asset_name: MCE-OLED-Gallery-macOS.zip
output: dist/MCE.OLED.GALLERY.app
pyinstaller_flags: '--add-data "gcmcepr.png:." --add-data "database.json:."'
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install Linux system dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y \
python3-tk \
tk-dev \
python3-dev \
libglib2.0-0 \
libgl1
- name: Install Python dependencies
run: |
pip install pillow numpy pyinstaller tkinterdnd2
- name: Build Executable
shell: bash
run: >
python -m PyInstaller --onefile --windowed
${{ matrix.pyinstaller_flags }}
${{ matrix.script }}
- name: Package macOS App
if: matrix.os == 'macos-latest'
run: |
cd dist
zip -r "../${{ matrix.asset_name }}" "$(basename "${{ matrix.output }}")"
cd ..
- name: Rename Output (Windows/Linux)
if: matrix.os != 'macos-latest'
shell: bash
run: mv "${{ matrix.output }}" "${{ matrix.asset_name }}"
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.asset_name }}
path: ${{ matrix.asset_name }}
- name: Create Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{ matrix.asset_name }}