@@ -57,20 +57,24 @@ jobs:
5757
5858 # Set up Python
5959 - name : Set up Python
60+ if : steps.check_build.outputs.build_needed == 'true'
6061 uses : actions/setup-python@v4
6162 with :
6263 python-version : ' 3.10'
6364
6465 # Install PyInstaller
6566 - name : Install PyInstaller
67+ if : steps.check_build.outputs.build_needed == 'true'
6668 run : pip install pyinstaller
6769
6870 # Install Python dependencies
6971 - name : Install Python dependencies
72+ if : steps.check_build.outputs.build_needed == 'true'
7073 run : pip install -r src/python/requirements.txt
7174
7275 # Build EXE to a temporary directory
7376 - name : Build EXE
77+ if : steps.check_build.outputs.build_needed == 'true'
7478 run : |
7579 mkdir temp_dist
7680 pyinstaller --onefile --clean --distpath temp_dist src/python/rag.py
7983
8084 # Compress EXE with UPX
8185 - name : Compress EXE with UPX
86+ if : steps.check_build.outputs.build_needed == 'true'
8287 uses : crazy-max/ghaction-upx@v3
8388 with :
8489 version : latest
@@ -88,12 +93,14 @@ jobs:
8893
8994 # Generate MD5 checksum
9095 - name : Generate MD5 checksum
96+ if : steps.check_build.outputs.build_needed == 'true'
9197 run : |
9298 $md5 = (Get-FileHash -Path temp_dist/rag.exe -Algorithm MD5).Hash
9399 echo $md5.ToLower() > temp_dist/md5.txt
94100 shell : pwsh
95101
96102 - name : Delete old Release
103+ if : steps.check_build.outputs.build_needed == 'true'
97104 run : |
98105 gh release view latest --json url 2>$null
99106 $releaseExists = ($LASTEXITCODE -eq 0)
@@ -110,6 +117,7 @@ jobs:
110117 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
111118
112119 - name : Create Release
120+ if : steps.check_build.outputs.build_needed == 'true'
113121 uses : softprops/action-gh-release@v2
114122 with :
115123 files : |
0 commit comments