-
Notifications
You must be signed in to change notification settings - Fork 50
53 lines (44 loc) · 1.24 KB
/
Build Executables.yml
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
name: Build and Package Python Executables
on:
push:
branches:
- main
- develop
paths:
- 'src/*'
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.11.5
- name: Install Dependencies
run: |
pip install -r requirements.txt
shell: bash
- name: Install PyInstaller
run: |
pip install pyinstaller
shell: bash
- name: Build Executable
run: |
if [ "${{ matrix.os }}" == "windows-latest" ]; then
pyinstaller --onefile --add-data "src/assets;." -n 7mao_tool_windows -i main.ico src/main.py
elif [ "${{ matrix.os }}" == "macos-latest" ]; then
pyinstaller --onefile --add-data "src/assets;." -n 7mao_tool_macos -i main.ico src/main.py
else
pyinstaller --onefile --add-data "src/assets;." -n 7mao_tool_ubuntu -i main.ico src/main.py
fi
shell: bash
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: executables
path: dist/