Skip to content

Commit 5d0dec8

Browse files
committed
ci: use Compress-Archive in Windows try to prevent Defender false positives
1 parent 6877e05 commit 5d0dec8

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.github/workflows/package.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ on:
99
jobs:
1010
windows:
1111
name: Package Windows
12-
runs-on: ubuntu-latest
12+
runs-on: windows-2019
1313
strategy:
1414
matrix:
15-
runtime: [win-x64, win-arm64]
15+
runtime: [ win-x64, win-arm64 ]
1616
steps:
1717
- name: Checkout sources
1818
uses: actions/checkout@v4
@@ -22,6 +22,7 @@ jobs:
2222
name: sourcegit.${{ matrix.runtime }}
2323
path: build/SourceGit
2424
- name: Package
25+
shell: bash
2526
env:
2627
VERSION: ${{ inputs.version }}
2728
RUNTIME: ${{ matrix.runtime }}

build/scripts/package.windows.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,8 @@ cd build
99

1010
rm -rf SourceGit/*.pdb
1111

12-
zip "sourcegit_$VERSION.$RUNTIME.zip" -r SourceGit
12+
if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "cygwin" || "$OSTYPE" == "win32" ]]; then
13+
powershell -Command "Compress-Archive -Path SourceGit\\* -DestinationPath \"sourcegit_$VERSION.$RUNTIME.zip\" -Force"
14+
else
15+
zip "sourcegit_$VERSION.$RUNTIME.zip" -r SourceGit
16+
fi

0 commit comments

Comments
 (0)