File tree Expand file tree Collapse file tree 3 files changed +73
-0
lines changed
Expand file tree Collapse file tree 3 files changed +73
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build for Linux
2+
3+ on :
4+ release :
5+ types :
6+ - created
7+ - published
8+
9+ jobs :
10+ build :
11+ name : Build for linux
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Install UPX
15+ run : |
16+ sudo apt-get update -y
17+ sudo apt-get install -y upx
18+ - uses : actions/checkout@v2
19+ - name : Install Python 3.8
20+ uses : actions/setup-python@v2
21+ with :
22+ python-version : 3.8
23+ - name : Install dependencies
24+ run : |
25+ python -m pip install --upgrade pip
26+ pip install -r requirements.txt
27+ - name : Build binary with PyInstaller
28+ run : pyinstaller app.py --onefile --clean --exclude-module tensorflow
29+ - name : Upload binary
30+ uses : actions/upload-release-asset@v1
31+ env :
32+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
33+ with :
34+ upload_url : ${{ github.event.release.upload_url }}
35+ asset_path : ./dist/app
36+ asset_name : app
37+ asset_content_type : application/octet-stream
Original file line number Diff line number Diff line change 1+ name : Build for Windows
2+
3+ on :
4+ release :
5+ types :
6+ - created
7+ - published
8+
9+ jobs :
10+ build :
11+ name : Build for windows (.exe)
12+ runs-on : windows-latest
13+ steps :
14+ - name : Install UPX
15+ run : choco install upx -y
16+ - uses : actions/checkout@v2
17+ - name : Install Python 3.8
18+ uses : actions/setup-python@v2
19+ with :
20+ python-version : 3.8
21+ - name : Install dependencies
22+ run : |
23+ python -m pip install --upgrade pip
24+ pip install -r requirements.txt
25+ - name : Build exe with PyInstaller
26+ run : pyinstaller app.py --onefile --clean --exclude-module tensorflow
27+ - name : Upload .exe
28+ uses : actions/upload-release-asset@v1
29+ env :
30+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
31+ with :
32+ upload_url : ${{ github.event.release.upload_url }}
33+ asset_path : ./dist/app.exe
34+ asset_name : app.exe
35+ asset_content_type : application/vnd.microsoft.portable-executable
Original file line number Diff line number Diff line change @@ -6,5 +6,6 @@ Flask==2.0.1
66
77# requirements-dev
88pre-commit == 2.13.0
9+ PyInstaller == 4.5.1
910black
1011autoflake
You can’t perform that action at this time.
0 commit comments