From 57b72d6d57a706795313ba0e2fdecb3f74f09613 Mon Sep 17 00:00:00 2001 From: Huang Xin Date: Sun, 5 Jan 2025 14:18:54 +0100 Subject: [PATCH] Release exe portable files directly to workaround the stupid virus warning on Windows --- .github/workflows/release.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c93003cb..4d3cc2b5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -153,19 +153,22 @@ jobs: version=${{ needs.get-release.outputs.release_version }} if [ "$arch" = "x86_64" ]; then - zip_name="Readest_${version}_x64-portable.zip" + bin_file="Readest_${version}_x64-portable.exe" elif [ "$arch" = "aarch64" ]; then - zip_name="Readest_${version}_arm64-portable.zip" + bin_file="Readest_${version}_arm64-portable.exe" else echo "Unknown architecture: $arch" exit 1 fi - bin_path="apps/readest-app/src-tauri/target/${{ matrix.config.rust_target }}/release/readest.exe" - powershell.exe -Command "Compress-Archive -Path $bin_path -DestinationPath $zip_name -Force" + exe_file="apps/readest-app/src-tauri/target/${{ matrix.config.rust_target }}/release/readest.exe" + # Browsers on Windows won't download zip files that contain exe files + # so upload the exe files instead. This is totally stupid. + # powershell.exe -Command "Compress-Archive -Path $exe_file -DestinationPath $bin_file -Force" + cp $exe_file $bin_file - echo "Uploading $zip_name to GitHub release" - gh release upload ${{ needs.get-release.outputs.release_tag }} $zip_name --clobber + echo "Uploading $bin_file to GitHub release" + gh release upload ${{ needs.get-release.outputs.release_tag }} $bin_file --clobber update-release: permissions: