@@ -118,6 +118,8 @@ jobs:
118118 run : |
119119 cp src-tauri/target/${{ matrix.target || 'x86_64-unknown-linux-musl' }}/release/eim release_cli/${{ matrix.package_name }}/eim
120120 chmod +x release_cli/${{ matrix.package_name }}/eim
121+ cd release_cli/${{ matrix.package_name }}
122+ zip -r eim.zip eim
121123 shell : bash
122124
123125 - name : Upload build artifacts
@@ -133,16 +135,15 @@ jobs:
133135 name : eim-cli-${{ matrix.package_name }}-${{ github.ref_name }}
134136 path : release_cli/${{ matrix.package_name }}/eim
135137
136- - name : Upload Release Asset
137- if : github.event_name == 'release' && github.event.action == 'created'
138- uses : actions/ upload-release-asset@v1
138+ - name : Upload Release Asset - Unix
139+ if : github.event_name == 'release' && github.event.action == 'created' && runner.os != 'Windows'
140+ uses : shogo82148/actions- upload-release-asset@v1
139141 env :
140- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
142+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
141143 with :
142- upload_url : ${{ github.event.release.upload_url }}
143- asset_path : release_cli/${{ matrix.package_name }}/eim
144- asset_name : eim-cli-${{ matrix.package_name }}-${{ github.ref_name }}
145- asset_content_type : application/zip
144+ upload_url : ${{ github.event.release.upload_url }}
145+ asset_path : release_cli/${{ matrix.package_name }}/eim.zip
146+ asset_name : eim-cli-${{ matrix.package_name }}.zip
146147
147148 build-cli :
148149 name : Build CLI (${{ matrix.package_name }})
@@ -203,18 +204,6 @@ jobs:
203204 key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
204205 restore-keys : ${{ runner.os }}-cargo-
205206
206- - name : Debug Perl Environment (Windows)
207- if : runner.os == 'Windows'
208- shell : powershell
209- run : |
210- echo "PERL5LIB: $env:PERL5LIB"
211- C:\hostedtoolcache\windows\perl\5.38.4-thr\x64\bin\perl.exe -V
212- C:\hostedtoolcache\windows\perl\5.38.4-thr\x64\bin\perl.exe -e "print qq(@INC\n)"
213- C:\hostedtoolcache\windows\perl\5.38.4-thr\x64\bin\perl.exe -MLocale::Maketext::Simple -e "print 'Locale::Maketext::Simple loaded successfully\n'"
214- C:\hostedtoolcache\windows\perl\5.38.4-thr\x64\bin\perl.exe -MText::Template -e "print 'Text::Template loaded successfully\n'"
215- C:\hostedtoolcache\windows\perl\5.38.4-thr\x64\bin\perl.exe -MParams::Check -e "print 'Params::Check loaded successfully\n'"
216- C:\hostedtoolcache\windows\perl\5.38.4-thr\x64\bin\perl.exe -MIPC::Cmd -e "print 'IPC::Cmd loaded successfully\n'"
217-
218207 - name : Build CLI
219208 if : runner.os == 'Windows'
220209 env :
@@ -248,6 +237,8 @@ jobs:
248237 run : |
249238 cp src-tauri/target/${{ matrix.target }}/release/eim release_cli/${{ matrix.package_name }}/eim
250239 chmod +x release_cli/${{ matrix.package_name }}/eim
240+ cd release_cli/${{ matrix.package_name }}
241+ zip -r eim.zip eim
251242 shell : bash
252243
253244 - name : Sign Windows Binary
@@ -306,16 +297,25 @@ jobs:
306297 name : eim-cli-${{ matrix.package_name }}-${{ github.ref_name }}
307298 path : release_cli/${{ matrix.package_name }}/eim${{ runner.os == 'Windows' && 'exe' || '' }}
308299
309- - name : Upload Release Asset
310- if : github.event_name == 'release' && github.event.action == 'created'
311- uses : actions/upload-release-asset@v1
300+ - name : Upload Release Asset - MacOs
301+ if : github.event_name == 'release' && github.event.action == 'created' && runner.os != 'Windows'
302+ uses : shogo82148/actions-upload-release-asset@v1
303+ env :
304+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
305+ with :
306+ upload_url : ${{ github.event.release.upload_url }}
307+ asset_path : release_cli/${{ matrix.package_name }}/eim.zip
308+ asset_name : eim-cli-${{ matrix.package_name }}.zip
309+
310+ - name : Upload Release Asset (Windows)
311+ if : github.event_name == 'release' && github.event.action == 'created' && runner.os == 'Windows'
312+ uses : shogo82148/actions-upload-release-asset@v1
312313 env :
313314 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
314315 with :
315316 upload_url : ${{ github.event.release.upload_url }}
316- asset_path : release_cli/${{ matrix.package_name }}/eim${{ runner.os == 'Windows' && 'exe' || '' }}
317- asset_name : eim-cli-${{ matrix.package_name }}-${{ github.ref_name }}.zip
318- asset_content_type : application/zip
317+ asset_path : release_cli/${{ matrix.package_name }}/eim.exe
318+ asset_name : eim-cli-${{ matrix.package_name }}.exe
319319
320320 build-gui :
321321 name : Build GUI (${{ matrix.package_name }})
@@ -407,11 +407,15 @@ jobs:
407407 run : |
408408 chmod +x src-tauri/target/release/eim
409409 chmod +x src-tauri/target/release/bundle/appimage/*.AppImage
410+ cd src-tauri/target/release/
411+ zip -r eim.zip eim
410412
411413 - name : Handle macOS artifacts
412414 if : startsWith(matrix.os, 'macos')
413415 run : |
414416 chmod +x src-tauri/target/release/bundle/macos/eim.app
417+ cd src-tauri/target/release/bundle/macos
418+ zip -r eim.zip eim.app
415419
416420 - name : Upload Linux artifacts
417421 if : startsWith(matrix.os, 'ubuntu')
@@ -446,16 +450,35 @@ jobs:
446450 # src-tauri/target/release/bundle/msi/*.msi
447451 if-no-files-found : error
448452
449- - name : Upload Release Assets
450- if : github.event_name == 'release' && github.event.action == 'created'
451- uses : actions/upload-release-asset@v1
453+ - name : Upload Release Assets (Windows)
454+ if : github.event_name == 'release' && github.event.action == 'created' && runner.os == 'Windows'
455+ uses : shogo82148/actions-upload-release-asset@v1
456+ env :
457+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
458+ with :
459+ upload_url : ${{ github.event.release.upload_url }}
460+ asset_path : src-tauri/target/release/eim.exe
461+ asset_name : eim-gui-${{ matrix.package_name }}.exe
462+
463+ - name : Upload Release Assets (Linux)
464+ if : github.event_name == 'release' && github.event.action == 'created' && startsWith(matrix.os, 'ubuntu')
465+ uses : shogo82148/actions-upload-release-asset@v1
466+ env :
467+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
468+ with :
469+ upload_url : ${{ github.event.release.upload_url }}
470+ asset_path : src-tauri/target/release/eim.zip
471+ asset_name : eim-gui-${{ matrix.package_name }}.zip
472+
473+ - name : Upload Release Assets (macOS)
474+ if : github.event_name == 'release' && github.event.action == 'created' && startsWith(matrix.os, 'macos')
475+ uses : shogo82148/actions-upload-release-asset@v1
452476 env :
453477 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
454478 with :
455479 upload_url : ${{ github.event.release.upload_url }}
456- asset_path : ${{ runner.os == 'Windows' && 'src-tauri/target/release/eim.exe' || (startsWith(matrix.os, 'macos') && 'src-tauri/target/release/eim' || 'src-tauri/target/release/bundle/macos/eim') }}
457- asset_name : eim-gui-${{ matrix.package_name }}.${{ runner.os == 'Windows' && 'exe' || '' }}
458- asset_content_type : ${{ runner.os == 'Windows' && 'application/octet-stream' || 'application/zip' }}
480+ asset_path : src-tauri/target/release/bundle/macos/eim.zip
481+ asset_name : eim-gui-${{ matrix.package_name }}.zip
459482
460483 test-cli :
461484 name : Test CLI Binary (${{ matrix.package_name }})
0 commit comments