-
Notifications
You must be signed in to change notification settings - Fork 18
73 lines (63 loc) · 1.82 KB
/
python-app.yml
File metadata and controls
73 lines (63 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
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/