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 --dart-define=BASE_URL=https://jiu.51yanmei.com --dart-define=PUBLIC_URL=https://jiu.51yanmei.com - 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