Skip to content

Commit d9c14e7

Browse files
authored
Merge pull request #3 from lr222gw/build
Build
2 parents 3ed7953 + 877c08e commit d9c14e7

1 file changed

Lines changed: 55 additions & 12 deletions

File tree

.github/workflows/build.yml

Lines changed: 55 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ on:
77
workflow_dispatch:
88

99
jobs:
10-
build:
10+
build_linux:
1111
runs-on: ubuntu-latest
12-
12+
1313
steps:
1414
- name: Checkout code
1515
uses: actions/checkout@v4
@@ -24,20 +24,63 @@ jobs:
2424
pip install pyinstaller
2525
pip install pyqt5
2626
27-
- name: Build for Windows
27+
- name: Build
2828
run: pyinstaller --onefile cpppc.py
29-
if: runner.os == 'Windows'
29+
30+
- name: Upload artifacts
31+
uses: actions/upload-artifact@v4
32+
with:
33+
name: executable-linux
34+
path: dist/
3035

31-
- name: Build for macOS
32-
run: pyinstaller --onefile cpppc.py
33-
if: runner.os == 'macOS'
36+
build_windows:
37+
runs-on: windows-latest
38+
steps:
39+
- name: Checkout code
40+
uses: actions/checkout@v4
3441

35-
- name: Build for Linux
36-
run: pyinstaller --onefile cpppc.py
37-
if: runner.os == 'Linux'
42+
- name: Set up Python
43+
uses: actions/setup-python@v5
44+
with:
45+
python-version: 3.11
3846

39-
- name: Archive artifacts
47+
- name: Install dependencies
48+
run: |
49+
pip install pyinstaller
50+
pip install pyqt5
51+
52+
- name: Build
53+
run: pyinstaller --onefile cpppc.py
54+
55+
- name: Upload artifacts
4056
uses: actions/upload-artifact@v4
4157
with:
42-
name: executables
58+
name: executable-windows
4359
path: dist/
60+
61+
build_macos:
62+
runs-on: macos-latest
63+
steps:
64+
- name: Checkout code
65+
uses: actions/checkout@v4
66+
67+
- name: Set up Python
68+
uses: actions/setup-python@v5
69+
with:
70+
python-version: 3.11
71+
72+
- name: Install dependencies
73+
run: |
74+
pip install pyinstaller
75+
pip install pyqt5
76+
77+
- name: Build
78+
run: pyinstaller --onefile cpppc.py
79+
80+
- name: Upload artifacts
81+
uses: actions/upload-artifact@v4
82+
83+
with:
84+
name: executable-macos
85+
path: dist/
86+

0 commit comments

Comments
 (0)