|
46 | 46 | - name: Setup Bun |
47 | 47 | uses: oven-sh/setup-bun@v1 |
48 | 48 | with: |
49 | | - bun-version: "1.3.2" |
| 49 | + bun-version: "1.3.6" |
50 | 50 |
|
51 | 51 | - name: Cache dependencies |
52 | 52 | uses: actions/cache@v4 |
@@ -152,7 +152,7 @@ jobs: |
152 | 152 | - name: Setup Bun |
153 | 153 | uses: oven-sh/setup-bun@v1 |
154 | 154 | with: |
155 | | - bun-version: "1.3.2" |
| 155 | + bun-version: "1.3.6" |
156 | 156 |
|
157 | 157 | - name: Cache dependencies |
158 | 158 | uses: actions/cache@v4 |
@@ -234,3 +234,104 @@ jobs: |
234 | 234 | path: apps/desktop/release/*-linux.yml |
235 | 235 | retention-days: ${{ inputs.artifact_retention_days }} |
236 | 236 | if-no-files-found: error |
| 237 | + |
| 238 | + build-windows: |
| 239 | + name: Build - Windows (x64) |
| 240 | + runs-on: windows-latest |
| 241 | + environment: production |
| 242 | + |
| 243 | + steps: |
| 244 | + - name: Checkout code |
| 245 | + uses: actions/checkout@v4 |
| 246 | + |
| 247 | + - name: Setup Bun |
| 248 | + uses: oven-sh/setup-bun@v1 |
| 249 | + with: |
| 250 | + bun-version: "1.3.6" |
| 251 | + |
| 252 | + - name: Cache dependencies |
| 253 | + uses: actions/cache@v4 |
| 254 | + with: |
| 255 | + path: | |
| 256 | + ~/.bun/install/cache |
| 257 | + key: ${{ runner.os }}-bun-${{ github.sha }} |
| 258 | + restore-keys: | |
| 259 | + ${{ runner.os }}-bun- |
| 260 | +
|
| 261 | + - name: Install dependencies |
| 262 | + run: bun install --frozen |
| 263 | + |
| 264 | + - name: Set version suffix |
| 265 | + if: inputs.version_suffix != '' |
| 266 | + working-directory: apps/desktop |
| 267 | + shell: bash |
| 268 | + run: | |
| 269 | + CURRENT_VERSION=$(node -p "require('./package.json').version") |
| 270 | + NEW_VERSION="${CURRENT_VERSION}${{ inputs.version_suffix }}" |
| 271 | + echo "Setting version to: $NEW_VERSION" |
| 272 | + node -e " |
| 273 | + const fs = require('fs'); |
| 274 | + const pkg = require('./package.json'); |
| 275 | + pkg.version = '$NEW_VERSION'; |
| 276 | + fs.writeFileSync('./package.json', JSON.stringify(pkg, null, '\t') + '\n'); |
| 277 | + " |
| 278 | + echo "Updated package.json version to $NEW_VERSION" |
| 279 | +
|
| 280 | + - name: Clean dev folder |
| 281 | + working-directory: apps/desktop |
| 282 | + run: bun run clean:dev |
| 283 | + |
| 284 | + - name: Compile app with electron-vite |
| 285 | + working-directory: apps/desktop |
| 286 | + env: |
| 287 | + NEXT_PUBLIC_POSTHOG_KEY: ${{ secrets.NEXT_PUBLIC_POSTHOG_KEY }} |
| 288 | + NEXT_PUBLIC_POSTHOG_HOST: ${{ secrets.NEXT_PUBLIC_POSTHOG_HOST }} |
| 289 | + GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }} |
| 290 | + GH_CLIENT_ID: ${{ secrets.GH_CLIENT_ID }} |
| 291 | + NEXT_PUBLIC_WEB_URL: ${{ secrets.NEXT_PUBLIC_WEB_URL }} |
| 292 | + NEXT_PUBLIC_API_URL: ${{ secrets.NEXT_PUBLIC_API_URL }} |
| 293 | + NEXT_PUBLIC_DOCS_URL: ${{ secrets.NEXT_PUBLIC_DOCS_URL }} |
| 294 | + NEXT_PUBLIC_STREAMS_URL: ${{ secrets.NEXT_PUBLIC_STREAMS_URL }} |
| 295 | + NEXT_PUBLIC_ELECTRIC_URL: ${{ secrets.NEXT_PUBLIC_ELECTRIC_URL }} |
| 296 | + SENTRY_DSN_DESKTOP: ${{ secrets.SENTRY_DSN_DESKTOP }} |
| 297 | + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} |
| 298 | + SUPERSET_WORKSPACE_NAME: superset |
| 299 | + run: bun run compile:app |
| 300 | + |
| 301 | + - name: Build Electron app |
| 302 | + working-directory: apps/desktop |
| 303 | + env: |
| 304 | + CSC_IDENTITY_AUTO_DISCOVERY: false |
| 305 | + WIN_CSC_LINK: ${{ secrets.WIN_CSC_LINK }} |
| 306 | + WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }} |
| 307 | + CSC_LINK: ${{ secrets.WIN_CSC_LINK }} |
| 308 | + CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }} |
| 309 | + run: bun run package -- --publish never --config ${{ inputs.electron_builder_config }} |
| 310 | + |
| 311 | + - name: Verify Windows installer + update manifest exist |
| 312 | + working-directory: apps/desktop |
| 313 | + shell: pwsh |
| 314 | + run: | |
| 315 | + Get-ChildItem release |
| 316 | + if (-not (Get-ChildItem release -Filter "*.exe" -File)) { |
| 317 | + Write-Error "No Windows installer generated in apps/desktop/release" |
| 318 | + } |
| 319 | + if (-not (Test-Path release/latest.yml)) { |
| 320 | + Write-Error "No Windows auto-update manifest generated in apps/desktop/release" |
| 321 | + } |
| 322 | +
|
| 323 | + - name: Upload Windows installer artifact |
| 324 | + uses: actions/upload-artifact@v4 |
| 325 | + with: |
| 326 | + name: ${{ inputs.artifact_prefix }}-windows-installer |
| 327 | + path: apps/desktop/release/*.exe |
| 328 | + retention-days: ${{ inputs.artifact_retention_days }} |
| 329 | + if-no-files-found: error |
| 330 | + |
| 331 | + - name: Upload Windows auto-update manifest |
| 332 | + uses: actions/upload-artifact@v4 |
| 333 | + with: |
| 334 | + name: ${{ inputs.artifact_prefix }}-windows-update-manifest |
| 335 | + path: apps/desktop/release/latest.yml |
| 336 | + retention-days: ${{ inputs.artifact_retention_days }} |
| 337 | + if-no-files-found: error |
0 commit comments