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,7 +9,7 @@ on:
jobs:
windows:
name: Package Windows
runs-on: ubuntu-latest
runs-on: windows-2019
strategy:
matrix:
runtime: [ win-x64, win-arm64 ]
@ -22,6 +22,7 @@ jobs:
name: sourcegit.${{ matrix.runtime }}
path: build/SourceGit
- name: Package
shell: bash
env:
VERSION: ${{ inputs.version }}
RUNTIME: ${{ matrix.runtime }}

View file

@ -9,4 +9,8 @@ cd build
rm -rf SourceGit/*.pdb
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