-
Notifications
You must be signed in to change notification settings - Fork 125
99 lines (81 loc) · 2.3 KB
/
pyinstaller.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: Package Application with Pyinstaller
on: [push]
permissions:
id-token: "write"
contents: "write"
packages: "write"
pull-requests: "read"
jobs:
winbuild: # Windows build
name: Build package on Windows
runs-on: windows-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyinstaller
pip install -r requirements.txt
- name: Install UPX
uses: crazy-max/ghaction-upx@v3
with:
install-only: true
- name: Package application
run: |
pyinstaller -i icons/icon.ico -F -w --clean --log-level WARN main.py
- name: Upload package
uses: actions/upload-artifact@v3
with:
name: win
path: dist/main.exe
macbuild: # MacOS Build
name: Build package on MacOS
runs-on: macos-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyinstaller
pip install -r requirements.txt
- name: Package application
run: |
pyinstaller -i icons/icon.icns -F -w --clean --log-level WARN main.py
cd dist
zip -r9 checker.zip main.app/
- name: Upload package
uses: actions/upload-artifact@v3
with:
name: mac
path: dist/checker.zip
upload: # Upload releases
name: Upload releases
runs-on: ubuntu-latest
needs: [winbuild, macbuild]
steps:
- name: Download artifact
uses: actions/download-artifact@v3
- name: Remame artifacts
run: |
mv win/main.exe checker-win-x64.exe
mv mac/checker.zip checker-mac.zip
- name: Create & upload release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: alpha
prerelease: true
title: GoogleTranslate_IPFinder
files: |
checker-win-x64.exe
checker-mac.zip