44 push :
55 branches : [ "main" ]
66 tags :
7- - " v*"
8- workflow_dispatch :
7+ - " v*" # Triggers on tags like v1.0, v2.3.4
8+ workflow_dispatch : # Allows manual triggering from GitHub UI
99
1010permissions :
1111 contents : write
1212
1313jobs :
1414 build :
15- strategy :
16- matrix :
17- os : [windows-latest, ubuntu-latest, macos-latest]
18-
19- runs-on : ${{ matrix.os }}
15+ runs-on : windows-latest
2016
2117 steps :
2218 - name : Checkout repository
@@ -30,61 +26,20 @@ jobs:
3026 - name : Install dependencies
3127 run : |
3228 python -m pip install --upgrade pip
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-
29+ pip install Pillow tkinterdnd2 pyinstaller
4230 - name : Build Executable
31+ # --collect-all tkinterdnd2 is crucial for the drag-and-drop library to work in the exe
4332 run : |
4433 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-
6134 - name : Upload Artifact
6235 uses : actions/upload-artifact@v4
6336 with :
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
37+ name : BZ98R_ModManager
38+ path : dist/BZ98R_ModManager.exe
8539
8640 - name : Create Release
41+ if : startsWith(github.ref, 'refs/tags/')
8742 uses : softprops/action-gh-release@v2
8843 with :
89- files : artifacts/**/*
44+ files : dist/BZ98R_ModManager.exe
9045 generate_release_notes : true
0 commit comments