44 push :
55 branches : [ "main" ]
66 tags :
7- - " v*" # Triggers on tags like v1.0, v2.3.4
8- workflow_dispatch : # Allows manual triggering from GitHub UI
7+ - " v*"
8+ workflow_dispatch :
99
1010permissions :
1111 contents : write
1212
1313jobs :
1414 build :
15- runs-on : windows-latest
15+ strategy :
16+ matrix :
17+ os : [windows-latest, ubuntu-latest, macos-latest]
18+
19+ runs-on : ${{ matrix.os }}
1620
1721 steps :
1822 - name : Checkout repository
@@ -26,20 +30,61 @@ jobs:
2630 - name : Install dependencies
2731 run : |
2832 python -m pip install --upgrade pip
29- pip install Pillow tkinterdnd2 pyinstaller
33+ pip install -r requirements.txt
34+ pip install pyinstaller
35+
36+ - name : Install Linux dependencies
37+ if : runner.os == 'Linux'
38+ run : |
39+ sudo apt-get update
40+ sudo apt-get install -y libtk8.6 tk8.6-dev
41+
3042 - name : Build Executable
31- # --collect-all tkinterdnd2 is crucial for the drag-and-drop library to work in the exe
3243 run : |
3344 pyinstaller build.spec
45+
46+ - name : Package Release (Windows)
47+ if : runner.os == 'Windows'
48+ run : |
49+ Compress-Archive -Path dist/BZ98R_ModManager -DestinationPath BZ98R_ModManager-windows.zip
50+
51+ - name : Package Release (Linux)
52+ if : runner.os == 'Linux'
53+ run : |
54+ tar -czvf BZ98R_ModManager-linux.tar.gz -C dist BZ98R_ModManager
55+
56+ - name : Package Release (macOS)
57+ if : runner.os == 'macOS'
58+ run : |
59+ tar -czvf BZ98R_ModManager-macos.tar.gz -C dist BZ98R_ModManager
60+
3461 - name : Upload Artifact
3562 uses : actions/upload-artifact@v4
3663 with :
37- name : BZ98R_ModManager
38- path : dist/BZ98R_ModManager.exe
64+ name : BZ98R_ModManager-${{ runner.os }}
65+ path : BZ98R_ModManager-*.zip
66+ if-no-files-found : ignore
67+
68+ - name : Upload Artifact (Tar)
69+ uses : actions/upload-artifact@v4
70+ with :
71+ name : BZ98R_ModManager-${{ runner.os }}
72+ path : BZ98R_ModManager-*.tar.gz
73+ if-no-files-found : ignore
74+
75+ release :
76+ needs : build
77+ runs-on : ubuntu-latest
78+ if : startsWith(github.ref, 'refs/tags/')
79+
80+ steps :
81+ - name : Download all artifacts
82+ uses : actions/download-artifact@v4
83+ with :
84+ path : artifacts
3985
4086 - name : Create Release
41- if : startsWith(github.ref, 'refs/tags/')
4287 uses : softprops/action-gh-release@v2
4388 with :
44- files : dist/BZ98R_ModManager.exe
89+ files : artifacts/**/*
4590 generate_release_notes : true
0 commit comments