From 32416e6983d766ef997141f3ba41789f2a361c88 Mon Sep 17 00:00:00 2001 From: wangjia <809946525@qq.com> Date: Thu, 16 Jul 2026 02:58:08 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20GitHub=20Actions=20windows-latest=20?= =?UTF-8?q?=E6=9E=84=E5=BB=BA=20jiu=20client(flutter=20build=20windows=20+?= =?UTF-8?q?=20=E6=89=93=E5=8C=85=20artifact)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/windows.yml | 45 +++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/windows.yml diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 0000000..5ac62e5 --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,45 @@ +name: Build Windows (jiu client) + +on: + workflow_dispatch: + push: + branches: [ main ] + paths: + - 'client/**' + - '.github/workflows/windows.yml' + +jobs: + build-windows: + runs-on: windows-latest + defaults: + run: + working-directory: client + steps: + - uses: actions/checkout@v4 + + - uses: subosito/flutter-action@v2 + with: + channel: stable + + - run: flutter --version + + - run: flutter config --enable-windows-desktop + + - run: flutter pub get + + - run: flutter build windows --release + + - name: Package Release + shell: pwsh + run: | + $rel = Get-ChildItem -Path build/windows -Recurse -Directory -Filter Release | + Where-Object { $_.FullName -match 'runner' } | Select-Object -First 1 + if (-not $rel) { throw 'Release dir not found' } + Write-Host "Release dir: $($rel.FullName)" + Compress-Archive -Path "$($rel.FullName)/*" -DestinationPath jiu-windows-x64.zip -Force + + - uses: actions/upload-artifact@v4 + with: + name: jiu-windows-x64 + path: client/jiu-windows-x64.zip + if-no-files-found: error