mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-20 21:01:06 +08:00
ci: use pwsh to make Windows packages instead of bash
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
4
.github/workflows/package.yml
vendored
4
.github/workflows/package.yml
vendored
@@ -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:
|
||||
|
||||
2
build/scripts/package.win.ps1
Normal file
2
build/scripts/package.win.ps1
Normal 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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user