@@ -38,17 +38,41 @@ jobs:
3838 pip install -r requirements.txt
3939
4040 - name : PyInstaller
41- run : pyinstaller --onefile --windowed main.py --name ${{ github.repository }}_${{ github.ref_name }}_${{ matrix.os }}
41+ run : pyinstaller --onefile --windowed main.py --name ${{ github.repository_id }}_${{ matrix.os }}
4242
4343 - name : List dist directory
4444 run : ls -R dist
4545
4646 - name : Tar files on Linux
4747 if : ${{ matrix.runner_os == 'ubuntu-latest' }}
4848 run : |
49- chmod +x dist/${{ github.repository }}_${{ github.ref_name }}_${{ matrix.os }}
50- tar -czvf dist/${{ github.repository }}_${{ github.ref_name }}_${{ matrix.os }}.tar.gz dist/${{ github.repository }}_${{ github.ref_name }}_${{ matrix.os }}
51- rm -rf dist/${{ github.repository }}_${{ github.ref_name }}_${{ matrix.os }}
49+ chmod +x dist/${{ github.repository_id }}_${{ matrix.os }}
50+ tar -czvf dist/${{ github.repository_id }}@${{ github.ref_name }}_${{ matrix.os }}.tar.gz dist/${{ github.repository_id }}_${{ matrix.os }}
51+ rm -rf dist/${{ github.repository_id }}_${{ matrix.os }}
52+
53+ - name : Zip artifact on Mac
54+ if : ${{ matrix.runner_os == 'macos-latest' }}
55+ run : |
56+ zip -r ${{ github.repository_id }}@${{ github.ref_name }}_${{ matrix.os }}.zip dist/
57+ rm -rf dist/
58+ mkdir dist/
59+ mv ${{ github.repository_id }}@${{ github.ref_name }}_${{ matrix.os }}.zip dist/
60+
61+ - name : Zip files on Windows
62+ if : ${{ matrix.runner_os == 'windows-latest' }}
63+ run : |
64+ $itemsToZip = @(".\dist\${{ matrix.os }}_cmd-release", ".\dist\${{ matrix.os }}_cli-release")
65+ Compress-Archive -Path $itemsToZip -DestinationPath ".\dist\${{ github.repository_id }}@${{ github.ref_name }}_${{ matrix.os }}.zip"
66+ if (Test-Path ".\dist\${{ github.repository_id }}@${{ github.ref_name }}_${{ matrix.os }}.zip") {
67+ foreach ($item in $itemsToZip) {
68+ Remove-Item -Path $item -Recurse -Force
69+ }
70+ Write-Output "Files zipped and originals deleted successfully."
71+ exit 0
72+ } else {
73+ Write-Output "Failed to create zip file. Source files were not deleted."
74+ exit 1
75+ }
5276
5377 - name : Upload debug builds
5478 uses : actions/upload-artifact@v4
82106 token : ${{ secrets.GITHUB_TOKEN }}
83107 generateReleaseNotes : true
84108 tag : ${{ github.ref_name }}
85- artifacts :
109+ artifacts : release-artifacts/*_dists/${{ github.repository_id }}_*
86110 draft : true
87111 name : " ${{ github.repository }}_${{ github.ref_name }}_*"
88112 body : " Need help? Refer to the documentation site."
0 commit comments