-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (46 loc) · 1.19 KB
/
python-app.yml
File metadata and controls
56 lines (46 loc) · 1.19 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
name: Build Executables
on:
push:
branches:
- master
pull_request:
branches:
- master
permissions:
contents: read
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.10
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyinstaller
pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Build Executable
run: |
pyinstaller --onefile --icon=logo.ico main.py
- name: Rename Executable
run: |
if [[ "${{ matrix.os }}" == "windows-latest" ]]; then
mv dist/main.exe dv78.exe
elif [[ "${{ matrix.os }}" == "macos-latest" ]]; then
mv dist/main dv78_macos
else
mv dist/main dv78_linux
fi
- name: Upload Executables
uses: actions/upload-artifact@v2
with:
name: dv78-executables-${{ matrix.os }}
path: dv78.*