|
| 1 | +name: Fork Windows installer check |
| 2 | + |
| 3 | +# Builds an unsigned Ada installer for Windows x64 through the nightly's own release-desktop.yml |
| 4 | +# and runs its "Verify Agents installer isolation" step, so installer changes are proven on the PR |
| 5 | +# instead of on the next nightly. Product name Ada exercises the renamed product with the exe |
| 6 | +# pinned to its old name; the nightly's FORK_PRODUCT_NAME may still lag behind. |
| 7 | + |
| 8 | +on: |
| 9 | + pull_request: |
| 10 | + paths: |
| 11 | + - apps/desktop/resources/*installer.nsh |
| 12 | + - scripts/test-agents-windows-installer.ps1 |
| 13 | + - scripts/lib/windows-package-names.ts |
| 14 | + - scripts/build-desktop-artifact.ts |
| 15 | + - .github/workflows/release-desktop.yml |
| 16 | + - .github/workflows/fork-windows-installer-check.yml |
| 17 | + workflow_dispatch: |
| 18 | + |
| 19 | +permissions: |
| 20 | + # release-desktop.yml's Windows build reads this run's artifacts to wait for the Linux CLI archive. |
| 21 | + actions: read |
| 22 | + contents: read |
| 23 | + |
| 24 | +concurrency: |
| 25 | + group: fork-windows-installer-check-${{ github.event.pull_request.number || github.ref }} |
| 26 | + cancel-in-progress: true |
| 27 | + |
| 28 | +jobs: |
| 29 | + prepare: |
| 30 | + if: github.repository == 'jayleaton/ada' |
| 31 | + runs-on: ubuntu-24.04 |
| 32 | + outputs: |
| 33 | + version: ${{ steps.version.outputs.version }} |
| 34 | + ref: ${{ steps.version.outputs.ref }} |
| 35 | + steps: |
| 36 | + - uses: actions/checkout@v6 |
| 37 | + with: |
| 38 | + ref: ${{ github.event.pull_request.head.sha || github.sha }} |
| 39 | + - id: version |
| 40 | + env: |
| 41 | + REF: ${{ github.event.pull_request.head.sha || github.sha }} |
| 42 | + run: | |
| 43 | + base=$(node -p 'JSON.parse(require("fs").readFileSync("apps/desktop/package.json", "utf8")).version.split("-")[0]') |
| 44 | + echo "version=$base-nightly.$(date -u +%Y%m%d).$((GITHUB_RUN_NUMBER * 1000 + GITHUB_RUN_ATTEMPT))" >> "$GITHUB_OUTPUT" |
| 45 | + echo "ref=$REF" >> "$GITHUB_OUTPUT" |
| 46 | +
|
| 47 | + build_bundle: |
| 48 | + needs: prepare |
| 49 | + runs-on: ubuntu-24.04 |
| 50 | + env: |
| 51 | + NODE_ENV: production |
| 52 | + T3CODE_DESKTOP_BRAND: agents |
| 53 | + APP_VERSION: ${{ needs.prepare.outputs.version }} |
| 54 | + steps: |
| 55 | + - uses: actions/checkout@v6 |
| 56 | + with: |
| 57 | + ref: ${{ needs.prepare.outputs.ref }} |
| 58 | + sparse-checkout: | |
| 59 | + /* |
| 60 | + !/.repos/ |
| 61 | + sparse-checkout-cone-mode: false |
| 62 | + - uses: voidzero-dev/setup-vp@250f29ce396baf5e8f24498e17c0dfdebabc26eb |
| 63 | + with: |
| 64 | + node-version-file: package.json |
| 65 | + run-install: false |
| 66 | + - name: Install build dependencies |
| 67 | + env: |
| 68 | + NODE_ENV: development |
| 69 | + run: vp install --frozen-lockfile |
| 70 | + - run: sudo apt-get update && sudo apt-get install -y libsecret-1-dev pkg-config |
| 71 | + - run: node scripts/update-release-package-versions.ts "$APP_VERSION" |
| 72 | + - run: vp run build:desktop |
| 73 | + - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a |
| 74 | + with: |
| 75 | + name: js-bundle |
| 76 | + path: | |
| 77 | + apps/server/dist |
| 78 | + apps/desktop/dist-electron |
| 79 | + if-no-files-found: error |
| 80 | + retention-days: 1 |
| 81 | + - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a |
| 82 | + with: |
| 83 | + name: mcp-gateway-bundle |
| 84 | + path: packages/mcp-gateway/dist |
| 85 | + if-no-files-found: error |
| 86 | + retention-days: 1 |
| 87 | + |
| 88 | + # The Windows build embeds this job's CLI archive as its WSL runtime. |
| 89 | + desktop_linux_x64: |
| 90 | + name: Desktop Linux x64 |
| 91 | + needs: [prepare, build_bundle] |
| 92 | + uses: ./.github/workflows/release-desktop.yml |
| 93 | + with: |
| 94 | + version: ${{ needs.prepare.outputs.version }} |
| 95 | + ref: ${{ needs.prepare.outputs.ref }} |
| 96 | + release_channel: nightly |
| 97 | + brand: agents |
| 98 | + app_id: ${{ vars.FORK_APP_ID || 'com.jayleaton.t3agents' }} |
| 99 | + product_name: Ada |
| 100 | + update_repository: ${{ github.repository }} |
| 101 | + label: Linux x64 |
| 102 | + runner: ubuntu-24.04 |
| 103 | + platform: linux |
| 104 | + target: AppImage |
| 105 | + arch: x64 |
| 106 | + rust_target: x86_64-unknown-linux-gnu |
| 107 | + resource_key: linux-x64 |
| 108 | + cli_archive: true |
| 109 | + |
| 110 | + # No secrets: the installer is unsigned, which the installer check does not depend on. |
| 111 | + desktop_win_x64: |
| 112 | + name: Desktop Windows x64 |
| 113 | + needs: [prepare, build_bundle, desktop_linux_x64] |
| 114 | + uses: ./.github/workflows/release-desktop.yml |
| 115 | + with: |
| 116 | + version: ${{ needs.prepare.outputs.version }} |
| 117 | + ref: ${{ needs.prepare.outputs.ref }} |
| 118 | + release_channel: nightly |
| 119 | + brand: agents |
| 120 | + app_id: ${{ vars.FORK_APP_ID || 'com.jayleaton.t3agents' }} |
| 121 | + product_name: Ada |
| 122 | + update_repository: ${{ github.repository }} |
| 123 | + label: Windows x64 |
| 124 | + runner: ubuntu-24.04 |
| 125 | + verify_runner: windows-2025 |
| 126 | + platform: win |
| 127 | + target: nsis |
| 128 | + arch: x64 |
| 129 | + rust_target: x86_64-pc-windows-msvc |
| 130 | + resource_key: win32-x64 |
| 131 | + cli_archive: true |
0 commit comments