ci: use pwsh to make Windows packages instead of bash

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo
2025-07-28 20:43:39 +08:00
parent 0acff99945
commit 5ce919ab66
3 changed files with 4 additions and 18 deletions

View File

@@ -22,11 +22,11 @@ jobs:
name: sourcegit.${{ matrix.runtime }}
path: build/SourceGit
- name: Package
shell: bash
shell: pwsh
env:
VERSION: ${{ inputs.version }}
RUNTIME: ${{ matrix.runtime }}
run: ./build/scripts/package.windows.sh
run: ./build/scripts/package.win.ps1
- name: Upload package artifact
uses: actions/upload-artifact@v4
with:

View File

@@ -0,0 +1,2 @@
Remove-Item -Path build\SourceGit\*.pdb -Force
Compress-Archive -Path build\SourceGit -DestinationPath "build\sourcegit_${env:VERSION}.${env:RUNTIME}.zip" -Force

View File

@@ -1,16 +0,0 @@
#!/usr/bin/env bash
set -e
set -o
set -u
set pipefail
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