Bundle aiosqlite and fix absolute symlinks in PyInstaller build #12
Workflow file for this run
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: Desktop Release | |
| on: | |
| push: | |
| tags: | |
| - 'desktop-v*' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: macos-14 | |
| platform: mac | |
| arch: arm64 | |
| electron_args: --mac --arm64 | |
| - os: macos-14 | |
| platform: mac | |
| arch: x64 | |
| electron_args: --mac --x64 | |
| - os: windows-latest | |
| platform: win | |
| arch: x64 | |
| electron_args: --win --x64 | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install web dependencies | |
| run: cd apps/web && npm ci | |
| - name: Install desktop dependencies | |
| run: cd apps/desktop && npm ci | |
| # API venv for `uv pip freeze` in build script | |
| - name: Setup API venv | |
| shell: bash | |
| run: | | |
| cd apps/api | |
| python -m venv .venv | |
| if [ "$RUNNER_OS" = "Windows" ]; then | |
| .venv/Scripts/pip install -e "." | |
| else | |
| .venv/bin/pip install -e "." | |
| fi | |
| - name: Build backend | |
| run: cd apps/desktop && npx tsx scripts/build-pyinstaller.ts | |
| shell: bash | |
| - name: Build frontend | |
| run: cd apps/desktop && npx tsx scripts/build-next.ts | |
| shell: bash | |
| - name: Compile TypeScript | |
| run: cd apps/desktop && npx tsc -p tsconfig.electron.json | |
| - name: Package | |
| env: | |
| CSC_IDENTITY_AUTO_DISCOVERY: 'false' | |
| run: cd apps/desktop && npx electron-builder ${{ matrix.electron_args }} --publish never --config electron-builder.yml | |
| shell: bash | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: desktop-${{ matrix.platform }}-${{ matrix.arch }} | |
| path: | | |
| apps/desktop/release/*.dmg | |
| apps/desktop/release/*.zip | |
| apps/desktop/release/*.exe | |
| if-no-files-found: error | |
| retention-days: 7 | |
| publish: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/desktop-v') | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: desktop-* | |
| merge-multiple: true | |
| path: artifacts/ | |
| - name: List artifacts | |
| run: find artifacts/ -type f | sort | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: artifacts/**/* | |
| draft: true | |
| name: QueryGPT Desktop ${{ github.ref_name }} | |
| body: | | |
| QueryGPT Desktop v${{ github.ref_name }} for macOS and Windows. | |
| ## Downloads | |
| - macOS (Apple Silicon): `.dmg` or `.zip` | |
| - macOS (Intel): `.dmg` or `.zip` | |
| - Windows: `.exe` (installer) or `.zip` (portable) | |
| ## Install | |
| macOS: mount the dmg, drag app to Applications, authorize in System Settings → Privacy & Security. | |
| Windows: run the installer or extract and launch exe directly. | |
| ## Features | |
| - Database connections (PostgreSQL, SQLite, MySQL, etc.) | |
| - Natural language to SQL | |
| - OpenAI-compatible model configuration | |
| - Semantic layer with custom business metrics | |
| - Query history | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |