fix: CLI 윈도우 인증 토큰 전달 — 프론트 쿠키 → URL param → Rust session #26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Desktop App | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| TAURI_ENV: "true" | |
| NEXT_PUBLIC_BACKEND_HOST: "https://xgen.x2bee.com" | |
| NEXT_PUBLIC_BACKEND_PORT: "" | |
| jobs: | |
| build-windows: | |
| runs-on: windows-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: frontend/package-lock.json | |
| continue-on-error: true | |
| - name: Clone xgen-frontend | |
| run: | | |
| git clone --depth 1 --branch main "https://sonsj97:${{ secrets.GITLAB_TOKEN }}@gitlab.x2bee.com/xgen2.0/xgen-frontend.git" frontend | |
| - name: Patch frontend for Tauri static export | |
| shell: bash | |
| run: bash scripts/patch-frontend.sh | |
| - name: Install frontend dependencies | |
| working-directory: frontend | |
| run: npm install | |
| - name: Build frontend (static export) | |
| working-directory: frontend | |
| run: npm run build | |
| - name: Copy CLI window HTML | |
| shell: bash | |
| run: cp src-cli/cli.html frontend/out/cli.html | |
| - name: Verify frontend build output | |
| run: | | |
| if (!(Test-Path "frontend/out")) { Write-Error "frontend/out not found"; exit 1 } | |
| Write-Host "Frontend build OK: $(Get-ChildItem -Recurse frontend/out -File | Measure-Object | Select-Object -ExpandProperty Count) files" | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Rust cache | |
| uses: swatinem/rust-cache@v2 | |
| with: | |
| workspaces: src-tauri | |
| cache-on-failure: true | |
| - name: Install Tauri CLI | |
| run: cargo install tauri-cli --version "^2" | |
| - name: Build Tauri app (Windows) | |
| working-directory: src-tauri | |
| run: cargo tauri build | |
| - name: Upload MSI installer | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: xgen-windows-msi | |
| path: src-tauri/target/release/bundle/msi/*.msi | |
| if-no-files-found: warn | |
| - name: Upload NSIS installer | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: xgen-windows-nsis | |
| path: src-tauri/target/release/bundle/nsis/*.exe | |
| if-no-files-found: warn | |
| build-macos: | |
| runs-on: macos-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Clone xgen-frontend | |
| run: | | |
| git clone --depth 1 --branch main "https://sonsj97:${{ secrets.GITLAB_TOKEN }}@gitlab.x2bee.com/xgen2.0/xgen-frontend.git" frontend | |
| - name: Patch frontend for Tauri static export | |
| run: bash scripts/patch-frontend.sh | |
| - name: Install frontend dependencies | |
| working-directory: frontend | |
| run: npm install | |
| - name: Build frontend (static export) | |
| working-directory: frontend | |
| run: npm run build | |
| - name: Copy CLI window HTML | |
| run: cp src-cli/cli.html frontend/out/cli.html | |
| - name: Verify frontend build output | |
| run: | | |
| test -d frontend/out || (echo "frontend/out not found" && exit 1) | |
| echo "Frontend build OK: $(find frontend/out -type f | wc -l) files" | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Rust cache | |
| uses: swatinem/rust-cache@v2 | |
| with: | |
| workspaces: src-tauri | |
| cache-on-failure: true | |
| - name: Install Tauri CLI | |
| run: cargo install tauri-cli --version "^2" | |
| - name: Build Tauri app (macOS) | |
| working-directory: src-tauri | |
| run: cargo tauri build | |
| - name: Upload DMG | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: xgen-macos-dmg | |
| path: src-tauri/target/release/bundle/dmg/*.dmg | |
| if-no-files-found: warn | |
| - name: Upload macOS app | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: xgen-macos-app | |
| path: src-tauri/target/release/bundle/macos/*.app | |
| if-no-files-found: warn |