ci: workflow 适配 Windows runner(windows-latest + bash shell)

This commit is contained in:
Reasonix committed 2026-08-14 16:30:20 +08:00
1 parent ad8d74f400
commit 5f95a8d47d
1 file changed
+8 -4
+8 -4
View File
@@ -9,7 +9,7 @@ on:
jobs:
build:
runs-on: ubuntu-latest
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -21,19 +21,21 @@ jobs:
- name: Get latest dsh version
id: version
shell: bash
run: |
LATEST=$(npm view @deepseek-ai/dsh version)
echo "latest=$LATEST"
echo "latest=$LATEST" >> "$GITHUB_OUTPUT"
- name: Assemble online package
shell: bash
run: |
mkdir -p pkg/app/src
cp app/dsh-app.exe pkg/app/
cp app/Microsoft.Web.WebView2.Core.dll app/Microsoft.Web.WebView2.WinForms.dll app/WebView2Loader.dll pkg/app/
cp app/src/dsh-app.cs app/src/app.manifest pkg/app/src/
cp dsh.ico README.md install.cmd uninstall.vbs register-uninstall.ps1 pkg/
cd pkg && python3 - <<'PY'
cd pkg && python - <<'PY'
import zipfile, os
with zipfile.ZipFile('../dsh-desktop-online.zip', 'w', zipfile.ZIP_DEFLATED) as z:
for r, _, fs in os.walk('.'):
@@ -44,18 +46,20 @@ PY
- name: Create release
id: release
shell: bash
run: |
VER="${{ steps.version.outputs.latest }}"
BODY="Auto-built by Gitea Actions. dsh version: ${VER}. Online install package (runs install.cmd, requires network)."
BODY="Auto-built by Gitea Actions. dsh version: ${VER}. Online install package (run install.cmd, requires network)."
curl -s -X POST \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Content-Type: application/json" \
-d "{\"tag_name\":\"v${VER}\",\"name\":\"DeepSeek Harness v${VER}\",\"body\":\"${BODY}\",\"draft\":false,\"prerelease\":false}" \
"https://git.vanusys.com/api/v1/repos/${{ github.repository }}/releases" > release.json
python3 -c "import json; print(json.load(open('release.json'))['id'])" > release_id.txt
python -c "import json; print(json.load(open('release.json'))['id'])" > release_id.txt
echo "release_id=$(cat release_id.txt)" >> "$GITHUB_OUTPUT"
- name: Upload asset
shell: bash
run: |
ID="${{ steps.release.outputs.release_id }}"
curl -s -X POST \