Skip to content

Update python-app.yml #456

Update python-app.yml

Update python-app.yml #456

Workflow file for this run

name: Build Metaminesweeper
on:
push:
branches:
- main
- master
tags:
- '*'
pull_request:
branches:
- main
- master
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Install Qt
uses: jurplel/install-qt-action@v3
- name: Generate translation qm files
run: |
lrelease src/ui/en_US.ts -qm src/en_US.qm
lrelease src/ui/de_DE.ts -qm src/de_DE.qm
lrelease src/ui/pl_PL.ts -qm src/pl_PL.qm
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Install Python dependencies
run: |
python -V
python -m pip install --upgrade pip
pip install flake8 pyinstaller>=6.19.0 cython
pip install -r requirements.txt
- name: Generate metaminesweeper_checksum.pyd
run: |
cd package_tool
python setup.py build_ext --inplace
ren *.pyd metaminesweeper_checksum.pyd
cd ..
move package_tool\metaminesweeper_checksum.pyd src\metaminesweeper_checksum.pyd
del src\metaminesweeper_checksum.py
- name: Package with PyInstaller
run: |
pyinstaller ^
--icon src/media/cat.ico ^
--noconsole ^
--noconfirm ^
--clean ^
--paths src ^
--name metaminesweeper ^
--add-data "src/media;media" ^
--add-data "src/en_US.qm;." ^
--add-data "src/de_DE.qm;." ^
--add-data "src/pl_PL.qm;." ^
src/main.py
- name: Upload artifacts
uses: actions/upload-artifact@v4
if: success()
with:
name: Metaminesweeper-snapshot
path: dist/