55 types : [published]
66
77jobs :
8+ build-win :
9+ name : Build Windows Installer
10+ runs-on : windows-latest
11+
12+ steps :
13+ - name : Checkout Code
14+ uses : actions/checkout@v4
15+
16+ - name : Set up Python (or any required setup)
17+ uses : actions/setup-python@v4
18+ with :
19+ python-version : ' 3.x' # Specify the Python version you need
20+ cache : ' pip'
21+ cache-dependency-path : requirements.txt
22+ - name : Install Dependencies
23+ run : |
24+ python -m pip install --upgrade pip
25+ pip install -r requirements.txt
26+
27+ - name : Run build step (example)
28+ run : |
29+ python setup.py ${{ github.event.release.tag_name }}
30+ pyinstaller --onefile installer.py
31+ move dist/installer.exe dist/installer-win.exe
32+ - name : Upload Asset to Release
33+ uses : softprops/action-gh-release@v3
34+ with :
35+ tag_name : ${{ github.event.release.tag_name }}
36+ files : |
37+ dist/installer-win.exe
38+ env :
39+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
40+ build-mac :
41+ name : Build Mac Installer
42+ runs-on : macos-latest
43+
44+ steps :
45+ - name : Checkout Code
46+ uses : actions/checkout@v4
47+
48+ - name : Set up Python (or any required setup)
49+ uses : actions/setup-python@v4
50+ with :
51+ python-version : ' 3.x' # Specify the Python version you need
52+ cache : ' pip'
53+ cache-dependency-path : requirements.txt
54+ - name : Install Dependencies
55+ run : |
56+ python -m pip install --upgrade pip
57+ pip install -r requirements.txt
58+
59+ - name : Run build step (example)
60+ run : |
61+ python setup.py ${{ github.event.release.tag_name }}
62+ pyinstaller --onefile installer.py
63+ mv dist/installer dist/installer-mac
64+ - name : Upload Asset to Release
65+ uses : softprops/action-gh-release@v3
66+ with :
67+ tag_name : ${{ github.event.release.tag_name }}
68+ files : |
69+ dist/installer-mac
70+ env :
71+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
872 append-assets :
973 name : Append Assets to Release
1074 runs-on : ubuntu-latest
@@ -28,12 +92,26 @@ jobs:
2892 run : |
2993 python setup.py ${{ github.event.release.tag_name }}
3094 pyinstaller --onefile installer.py
95+ mv dist/installer dist/installer-ubuntu
96+ - name : Download Windows Asset
97+ uses : actions/download-artifact@v3
98+ with :
99+ name : installer-win.exe
100+ path : dist/
101+ - name : Download Mac Asset
102+ uses : actions/download-artifact@v3
103+ with :
104+ name : installer-mac
105+ path : dist/
31106
32107 - name : Upload Asset to Release
33108 uses : softprops/action-gh-release@v1
34109 with :
35110 tag_name : ${{ github.event.release.tag_name }}
36111 files : |
37- dist/installer
112+ dist/installer-win.exe
113+ dist/installer-mac
114+ dist/installer-ubuntu
115+
38116 env :
39117 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments