Skip to content

Commit

Permalink
Update package_and_release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
God-2077 committed Jul 19, 2024
1 parent ab5b45c commit ce9198f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/package_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ jobs:
- name: Package Python scripts to EXE
shell: pwsh
run: |
Get-ChildItem -Directory | ForEach-Object { $latestScript = Get-ChildItem -Path "$($_.FullName)" -Filter *.py | Sort-Object LastWriteTime -Descending | Select-Object -First 1; if ($latestScript) { $scriptName = [System.IO.Path]::GetFileNameWithoutExtension($latestScript.Name); $exeName = "$scriptName.exe"; pyinstaller --onefile --distpath "$($_.FullName)\dist" --workpath "$($_.FullName)\build" --specpath "$($_.FullName)\spec" "$($latestScript.FullName)"; $distPath = "$($_.FullName)\dist"; $exePath = Join-Path -Path $distPath -ChildPath $exeName; $sortedExeName = "zz_$exeName"; Rename-Item -Path $exePath -NewName $sortedExeName } }
Get-ChildItem -Directory | ForEach-Object { $lastScript = Get-ChildItem -Path "$($_.FullName)" -Filter *.py | Sort-Object Name | Select-Object -Last 1; if ($lastScript) { $scriptName = [System.IO.Path]::GetFileNameWithoutExtension($lastScript.Name); $exeName = "$scriptName.exe"; pyinstaller --onefile --distpath "$($_.FullName)\dist" --workpath "$($_.FullName)\build" --specpath "$($_.FullName)\spec" "$($lastScript.FullName)" } }
- name: Create Release
Expand Down

0 comments on commit ce9198f

Please sign in to comment.