ci: use Compress-Archive in Windows try to prevent Defender false positives

This commit is contained in:
Gadfly 2025-03-10 00:36:59 +08:00
parent 6877e05566
commit 5d0dec85a6
No known key found for this signature in database
2 changed files with 8 additions and 3 deletions

View file

@ -9,4 +9,8 @@ cd build
rm -rf SourceGit/*.pdb
zip "sourcegit_$VERSION.$RUNTIME.zip" -r SourceGit
if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "cygwin" || "$OSTYPE" == "win32" ]]; then
powershell -Command "Compress-Archive -Path SourceGit\\* -DestinationPath \"sourcegit_$VERSION.$RUNTIME.zip\" -Force"
else
zip "sourcegit_$VERSION.$RUNTIME.zip" -r SourceGit
fi