Skip to content

Update README.md

Update README.md #347

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Build Metaminesweeper
on:
push:
branches:
- main
- master
tags:
- '*'
pull_request:
branches:
- main
- master
tags:
- '*'
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Install Qt
uses: jurplel/install-qt-action@v3
- name: transform qrc to py with pyrcc5
run: |
lrelease src/ui/en_US.ts -qm en_US.qm
lrelease src/ui/de_DE.ts -qm de_DE.qm
lrelease src/ui/pl_PL.ts -qm pl_PL.qm
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Python dependencies
run: |
python -V
python -m pip install --upgrade pip
pip install flake8 pyinstaller==4.10
pip install -r requirements.txt
# - name: transform ui to py with pyuic5
# run: |
# cd uiFiles
# pyuic5 -o ui_gameSettings.py ui_gs.ui
# pyuic5 -o ui_gameSettingShortcuts.py ui_gs_shortcuts.ui
# pyuic5 -o ui_defined_parameter.py ui_defined_parameter.ui
# pyuic5 -o ui_mine_num_bar.py ui_mine_num_bar.ui
# cd ..
# md src/ui
# cp uiFiles/ui_gameSettings.py src/ui/ui_gameSettings.py
# cp uiFiles/ui_gameSettingShortcuts.py src/ui/ui_gameSettingShortcuts.py
# cp uiFiles/ui_defined_parameter.py src/ui/ui_defined_parameter.py
# cp uiFiles/ui_mine_num_bar.py src/ui/ui_mine_num_bar.py
# - name: transform qrc to py with pyrcc5
# run: |
# cd src
# pyrcc5 src_help_pic.qrc -o src_help_pic_rc.py
# cd ..
- name: Generate metaminesweeper_checksum.pyd
run: |
pip install cython
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 -i cat.ico -w -y --clean --add-data "./media/*;./media" --add-data "./de_DE.qm;." --add-data "./pl_PL.qm;." --add-data "./en_US.qm;." -p src src/main.py -n metaminesweeper
- name: Move media and qm file
run: |
move dist/metaminesweeper/media dist/media
move dist/metaminesweeper/en_US.qm dist/en_US.qm
move dist/metaminesweeper/de_DE.qm dist/de_DE.qm
move dist/metaminesweeper/pl_PL.qm dist/pl_PL.qm
# upload the result package as an artifact
- name: Upload artifacts
uses: actions/upload-artifact@v4
if: success()
with:
name: Metaminesweeper-snapshot
path: dist/