-
Notifications
You must be signed in to change notification settings - Fork 1
667 lines (552 loc) · 23.9 KB
/
Copy pathbuild.yml
File metadata and controls
667 lines (552 loc) · 23.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
name: Build and Release Tauri App
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
tag:
description: 'Version tag'
required: false
type: string
env:
NODE_VERSION: '22'
RUST_VERSION: 'stable'
ALLOOMI_REPO: 'melandlabs/alloomi'
jobs:
get-version:
runs-on: ubuntu-22.04
outputs:
version: ${{ steps.version.outputs.version }}
checkout_ref: ${{ steps.version.outputs.checkout_ref }}
steps:
- id: version
run: |
if [ "${{ github.event.inputs.tag }}" != "" ]; then
echo "version=${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT
echo "checkout_ref=refs/tags/${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT
elif [[ "${{ github.ref }}" == refs/tags/* ]]; then
TAG="${GITHUB_REF#refs/tags/}"
echo "version=$TAG" >> $GITHUB_OUTPUT
echo "checkout_ref=${{ github.ref }}" >> $GITHUB_OUTPUT
fi
build-tauri-macos:
needs: get-version
if: needs.get-version.outputs.version != ''
runs-on: macos-14
steps:
- name: Checkout release repo
uses: actions/checkout@v4
- name: Clone alloomi source code
run: |
git clone https://x-access-token:${{ secrets.DEPLOY_ACCESS_TOKEN }}@github.com/${{ env.ALLOOMI_REPO }}.git alloomi
cd alloomi
git checkout ${{ needs.get-version.outputs.checkout_ref }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 9
- name: Add pnpm to PATH
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
echo "PNPM_HOME=$HOME/.local" >> $GITHUB_ENV
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_VERSION }}
- name: Install Rust targets
run: |
rustup target add aarch64-apple-darwin
rustup target add x86_64-apple-darwin
- name: Get pnpm store directory
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('alloomi/**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
working-directory: ./alloomi
run: pnpm install --frozen-lockfile --ignore-scripts
- name: Rebuild native modules for Tauri
working-directory: ./alloomi
run: |
pnpm rebuild better-sqlite3
# Copy the compiled .node into imessage-kit's nested better-sqlite3
mkdir -p node_modules/@photon-ai/imessage-kit/node_modules/better-sqlite3/build
cp node_modules/better-sqlite3/build/Release/better_sqlite3.node \
node_modules/@photon-ai/imessage-kit/node_modules/better-sqlite3/build/better_sqlite3.node
- name: Verify native modules are built
working-directory: ./alloomi
run: |
echo "=== Checking top-level better-sqlite3 ==="
ls -la node_modules/better-sqlite3/build/Release/better_sqlite3.node || exit 1
echo "=== Checking nested better-sqlite3 in imessage-kit ==="
ls -la node_modules/@photon-ai/imessage-kit/node_modules/better-sqlite3/build/better_sqlite3.node || exit 1
echo "✅ All native modules built successfully"
- name: Create .env file
working-directory: ./alloomi/apps/web
run: |
cat > .env << 'EOF'
# Cloud API Configuration for Tauri Desktop App
CLOUD_API_URL=https://app.alloomi.ai
NEXT_PUBLIC_CLOUD_API_URL=https://app.alloomi.ai
# Local development URL (for Tauri mode)
NEXT_PUBLIC_APP_URL=http://localhost:3415
LLM_BASE_URL=https://openrouter.ai/api/v1
LLM_MODEL=google/gemini-3-flash-preview
LLM_REASONING_MODEL=google/gemini-3-flash-preview
LLM_VISION_LANGUAGE_MODEL=google/gemini-3-flash-preview
LLM_IMAGE_MODEL=openai/gpt-5-image
LLM_EMBEDDING_MODEL=qwen/qwen3-embedding-4b
LLM_EMBEDDING_BASE_URL=https://openrouter.ai/api/v1
TELEGRAM_MODE=pooling
# Roles
ROLE_DETECTION_ENABLED=1
ROLE_OVERLAY_ANALYST_JOURNALIST=1
ROLE_OVERLAY_COMMUNITY_MANAGER=1
ROLE_OVERLAY_CUSTOMER_SUCCESS=1
ROLE_OVERLAY_EXECUTIVE=1
ROLE_OVERLAY_FREELANCER=1
ROLE_OVERLAY_INDIE_FOUNDER=1
ROLE_OVERLAY_INVESTOR_ADVISOR=1
ROLE_OVERLAY_REMOTE_WORKER=1
ROLE_OVERLAY_SALES_BIZDEV=1
ANTHROPIC_BASE_URL=http://localhost:3415/api/ai
API_TIMEOUT_MS=3000000
IS_TAURI=true
# iMessage Backend Mode
IMESSAGE_BACKEND_MODE=sdk
NEXT_PUBLIC_IMESSAGE_BACKEND_MODE=sdk
EOF
- name: Import Apple Certificate and Intermediate Certificates
env:
APPLE_CERTIFICATE: "${{ secrets.APPLE_CERTIFICATE }}"
APPLE_CERTIFICATE_PASSWORD: "${{ secrets.APPLE_CERTIFICATE_PASSWORD }}"
run: |
# Create a new keychain
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
security create-keychain -p "" $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p "" $KEYCHAIN_PATH
# Import Apple certificate
echo "$APPLE_CERTIFICATE" | base64 --decode > cert.p12
security import cert.p12 -P "$APPLE_CERTIFICATE_PASSWORD" -A -k $KEYCHAIN_PATH
rm cert.p12
# Download and import Apple intermediate certificates (not available in CI)
curl -s -o /tmp/AppleWWDRCAG3.cer https://www.apple.com/certificateauthority/AppleWWDRCAG3.cer
curl -s -o /tmp/DeveloperIDG2CA.cer https://www.apple.com/certificateauthority/DeveloperIDG2CA.cer
security import /tmp/AppleWWDRCAG3.cer -A -k $KEYCHAIN_PATH
security import /tmp/DeveloperIDG2CA.cer -A -k $KEYCHAIN_PATH
# List keychains to ensure system can access certificates
security list-keychain -d user -s $KEYCHAIN_PATH
- name: Build Tauri app (Apple Silicon)
working-directory: ./alloomi/apps/web
run: pnpm tauri:build
env:
APPLE_CERTIFICATE: "${{ secrets.APPLE_CERTIFICATE }}"
APPLE_CERTIFICATE_PASSWORD: "${{ secrets.APPLE_CERTIFICATE_PASSWORD }}"
APPLE_SIGNING_IDENTITY: "${{ secrets.APPLE_SIGNING_IDENTITY }}"
# Don't set APPLE_ID/APPLE_PASSWORD to prevent Tauri from auto-notarizing
# Notarization will be done manually in a separate step
SIGNING_IDENTITY: "${{ secrets.APPLE_SIGNING_IDENTITY }}"
- name: Sign app bundle with Developer ID
env:
APPLE_SIGNING_IDENTITY: "${{ secrets.APPLE_SIGNING_IDENTITY }}"
run: |
APP_BUNDLE="./alloomi/apps/web/src-tauri/target/release/bundle/macos/Alloomi.app"
echo "Signing app bundle: $APP_BUNDLE"
# Sign only the main executable and top-level bundle
# Skip cli-bundle to preserve its ad-hoc signature from bundle-runtime.sh
codesign --force --sign "$APPLE_SIGNING_IDENTITY" --options runtime --timestamp "$APP_BUNDLE"
# Sign the main MacOS executable specifically
codesign --force --sign "$APPLE_SIGNING_IDENTITY" --options runtime --timestamp "$APP_BUNDLE/Contents/MacOS/alloomi"
echo "✅ App bundle signed (cli-bundle preserved)"
- name: Create DMG
run: |
# Remove old DMG
rm -f ./alloomi/apps/web/src-tauri/target/release/bundle/dmg/Alloomi*.dmg
# Get the app bundle path
APP_BUNDLE="./alloomi/apps/web/src-tauri/target/release/bundle/macos/Alloomi.app"
DMG_PATH="./alloomi/apps/web/src-tauri/target/release/bundle/dmg/Alloomi_${{ needs.get-version.outputs.version }}_aarch64.dmg"
# Create a temporary directory for DMG contents
TEMP_DMG_DIR=$(mktemp -d)
cp -R "$APP_BUNDLE" "$TEMP_DMG_DIR/"
# Create symlink to /Applications (shows as "Applications" folder in DMG)
ln -s /Applications "$TEMP_DMG_DIR/Applications"
# Create DMG from the temp directory with proper layout
# This creates a DMG with the app on the left and Applications folder on the right
hdiutil create -volname "Alloomi" \
-fs HFS+ \
-srcfolder "$TEMP_DMG_DIR" \
-format UDZO \
"$DMG_PATH"
# Clean up temp directory
rm -rf "$TEMP_DMG_DIR"
echo "✅ DMG created from signed app bundle"
- name: Notarize DMG
timeout-minutes: 60
run: |
DMG_PATH=$(ls ./alloomi/apps/web/src-tauri/target/release/bundle/dmg/Alloomi*.dmg)
echo "Notarizing: $DMG_PATH"
# Verify DMG exists and check its signature
echo "Verifying DMG..."
codesign -dv "$DMG_PATH" 2>&1 | head -5
# Submit DMG for notarization
OUTPUT=$(xcrun notarytool submit "$DMG_PATH" \
--apple-id "${{ secrets.APPLE_ID }}" \
--password "${{ secrets.APPLE_PASSWORD }}" \
--team-id "${{ secrets.APPLE_TEAM_ID }}" 2>&1)
echo "$OUTPUT"
# Extract submission ID
SUBMISSION_ID=$(echo "$OUTPUT" | grep "id:" | head -1 | awk '{print $2}')
if [ -z "$SUBMISSION_ID" ]; then
echo "❌ Failed to get submission ID"
exit 1
fi
echo "Submission ID: $SUBMISSION_ID"
# Wait for notarization to complete
echo "Waiting for notarization to complete..."
if xcrun notarytool wait "$SUBMISSION_ID" \
--apple-id "${{ secrets.APPLE_ID }}" \
--password "${{ secrets.APPLE_PASSWORD }}" \
--team-id "${{ secrets.APPLE_TEAM_ID }}" 2>&1; then
echo "✅ Notarization accepted!"
else
echo "❌ Notarization failed"
exit 1
fi
# Wait for ticket propagation before stapling
# Apple servers can take a long time to propagate notarization tickets
echo "Waiting for ticket propagation..."
sleep 300
- name: Staple DMG
continue-on-error: true
run: |
DMG_PATH=$(ls ./alloomi/apps/web/src-tauri/target/release/bundle/dmg/Alloomi*.dmg)
echo "Stapling: $DMG_PATH"
# Retry stapling up to 20 times with longer delay
for i in $(seq 1 20); do
echo "Staple attempt $i..."
if xcrun stapler staple "$DMG_PATH" 2>&1; then
echo "✅ Staple succeeded on attempt $i"
break
else
echo "Staple failed, waiting 60 seconds before retry..."
sleep 60
fi
done
- name: Verify Staple
continue-on-error: true
run: |
DMG_PATH=$(ls ./alloomi/apps/web/src-tauri/target/release/bundle/dmg/Alloomi*.dmg)
xcrun stapler validate "$DMG_PATH"
- name: Find and rename DMG file
id: dmg
working-directory: ./alloomi/apps/web/src-tauri/target/release/bundle/dmg
run: |
# Get original filename
ORIGINAL=$(ls Alloomi*.dmg)
# Extract version and arch, add macOS platform
NEW=$(echo "$ORIGINAL" | sed 's/Alloomi_\(.*\)_aarch64\.dmg/Alloomi_\1_macOS_aarch64.dmg/')
mv "$ORIGINAL" "$NEW"
echo "path=$NEW" >> $GITHUB_OUTPUT
echo "full_path=$(pwd)/$NEW" >> $GITHUB_OUTPUT
- name: Upload Apple Silicon DMG
uses: actions/upload-artifact@v4
with:
name: alloomi-dmg-arm64
path: ${{ steps.dmg.outputs.full_path }}
build-tauri-linux:
needs: get-version
if: needs.get-version.outputs.version != ''
runs-on: ubuntu-22.04
steps:
- name: Checkout release repo
uses: actions/checkout@v4
- name: Clone alloomi source code
run: |
git clone https://x-access-token:${{ secrets.DEPLOY_ACCESS_TOKEN }}@github.com/${{ env.ALLOOMI_REPO }}.git alloomi
cd alloomi
git checkout ${{ needs.get-version.outputs.checkout_ref }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 9
- name: Add pnpm to PATH
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
echo "PNPM_HOME=$HOME/.local" >> $GITHUB_ENV
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_VERSION }}
- name: Install Rust target
run: |
rustup target add x86_64-unknown-linux-gnu
- name: Install dependencies
working-directory: ./alloomi
run: pnpm install --frozen-lockfile --ignore-scripts
- name: Rebuild native modules for Tauri
working-directory: ./alloomi
run: |
pnpm rebuild better-sqlite3
# Copy the compiled .node into imessage-kit's nested better-sqlite3
mkdir -p node_modules/@photon-ai/imessage-kit/node_modules/better-sqlite3/build
cp node_modules/better-sqlite3/build/Release/better_sqlite3.node \
node_modules/@photon-ai/imessage-kit/node_modules/better-sqlite3/build/better_sqlite3.node
- name: Verify native modules are built
working-directory: ./alloomi
run: |
echo "=== Checking top-level better-sqlite3 ==="
ls -la node_modules/better-sqlite3/build/Release/better_sqlite3.node || exit 1
echo "=== Checking nested better-sqlite3 in imessage-kit ==="
ls -la node_modules/@photon-ai/imessage-kit/node_modules/better-sqlite3/build/better_sqlite3.node || exit 1
echo "✅ All native modules built successfully"
- name: Create .env file
working-directory: ./alloomi/apps/web
run: |
cat > .env << 'EOF'
# Cloud API Configuration for Tauri Desktop App
CLOUD_API_URL=https://app.alloomi.ai
NEXT_PUBLIC_CLOUD_API_URL=https://app.alloomi.ai
# Local development URL (for Tauri mode)
NEXT_PUBLIC_APP_URL=http://localhost:3415
LLM_BASE_URL=https://openrouter.ai/api/v1
LLM_MODEL=google/gemini-3-flash-preview
LLM_REASONING_MODEL=google/gemini-3-flash-preview
LLM_VISION_LANGUAGE_MODEL=google/gemini-3-flash-preview
LLM_IMAGE_MODEL=openai/gpt-5-image
LLM_EMBEDDING_MODEL=qwen/qwen3-embedding-4b
LLM_EMBEDDING_BASE_URL=https://openrouter.ai/api/v1
TELEGRAM_MODE=pooling
# Roles
ROLE_DETECTION_ENABLED=1
ROLE_OVERLAY_ANALYST_JOURNALIST=1
ROLE_OVERLAY_COMMUNITY_MANAGER=1
ROLE_OVERLAY_CUSTOMER_SUCCESS=1
ROLE_OVERLAY_EXECUTIVE=1
ROLE_OVERLAY_FREELANCER=1
ROLE_OVERLAY_INDIE_FOUNDER=1
ROLE_OVERLAY_INVESTOR_ADVISOR=1
ROLE_OVERLAY_REMOTE_WORKER=1
ROLE_OVERLAY_SALES_BIZDEV=1
ANTHROPIC_BASE_URL=http://localhost:3415/api/ai
API_TIMEOUT_MS=3000000
IS_TAURI=true
# iMessage Backend Mode
IMESSAGE_BACKEND_MODE=sdk
NEXT_PUBLIC_IMESSAGE_BACKEND_MODE=sdk
EOF
- name: Install Linux build dependencies
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- name: Build Tauri app (Linux)
working-directory: ./alloomi/apps/web
run: pnpm tauri:build
env:
# Try to build only deb to avoid AppImage issues
TAURI_BUNDLE_TARGET: deb
continue-on-error: true
- name: Verify deb package exists
run: |
DEB_FILE=$(ls ./alloomi/apps/web/src-tauri/target/release/bundle/deb/*.deb 2>/dev/null || echo "")
if [ -z "$DEB_FILE" ]; then
echo "❌ Error: deb package not found!"
ls -la ./alloomi/apps/web/src-tauri/target/release/bundle/ 2>/dev/null || true
exit 1
fi
echo "✅ deb package found: $DEB_FILE"
- name: Find deb file
id: deb
working-directory: ./alloomi/apps/web/src-tauri/target/release/bundle/deb
run: |
ORIGINAL=$(ls *.deb)
# Rename Alloomi_0.3.1_amd64.deb to Alloomi_0.3.1_linux_amd64.deb
NEW=$(echo "$ORIGINAL" | sed 's/_amd64/_linux_amd64/')
mv "$ORIGINAL" "$NEW"
echo "path=$NEW" >> $GITHUB_OUTPUT
- name: Upload Linux deb
uses: actions/upload-artifact@v4
with:
name: alloomi-linux
path: ./alloomi/apps/web/src-tauri/target/release/bundle/deb/${{ steps.deb.outputs.path }}
build-tauri-windows:
needs: get-version
if: needs.get-version.outputs.version != ''
runs-on: windows-2022
steps:
- name: Checkout release repo
uses: actions/checkout@v4
- name: Clone alloomi source code
run: |
git clone https://x-access-token:${{ secrets.DEPLOY_ACCESS_TOKEN }}@github.com/${{ env.ALLOOMI_REPO }}.git alloomi
cd alloomi
git checkout ${{ needs.get-version.outputs.checkout_ref }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 9
- name: Add pnpm to PATH
run: |
Add-Content -Path $env:GITHUB_PATH -Value "$HOME\AppData\Local\pnpm"
Add-Content -Path $env:GITHUB_ENV -Value "PNPM_HOME=$HOME\AppData\Local\pnpm"
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_VERSION }}
- name: Install Rust target
run: |
rustup target add x86_64-pc-windows-msvc
- name: Get pnpm store directory
run: |
$storePath = pnpm store path --silent
Add-Content -Path $env:GITHUB_ENV -Value "STORE_PATH=$storePath"
- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('alloomi/**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
working-directory: ./alloomi
run: pnpm install --frozen-lockfile --ignore-scripts
- name: Rebuild native modules for Tauri
working-directory: ./alloomi
run: |
pnpm rebuild better-sqlite3
# Copy the compiled .node into imessage-kit's nested better-sqlite3
$destDir = "node_modules/@photon-ai/imessage-kit/node_modules/better-sqlite3/build/Release"
New-Item -ItemType Directory -Force -Path $destDir | Out-Null
Copy-Item "node_modules/better-sqlite3/build/Release/better_sqlite3.node" "$destDir\*"
- name: Verify native modules are built
working-directory: ./alloomi
run: |
Write-Host "=== Checking top-level better-sqlite3 ==="
Get-ChildItem -Path "node_modules/better-sqlite3/build/Release/better_sqlite3.node" -ErrorAction Stop
Write-Host "=== Checking nested better-sqlite3 in imessage-kit ==="
Get-ChildItem -Path "node_modules/@photon-ai/imessage-kit/node_modules/better-sqlite3/build/better_sqlite3.node" -ErrorAction Stop
Write-Host "All native modules built successfully"
- name: Create .env file
working-directory: ./alloomi/apps/web
run: |
$envContent = @"
# Cloud API Configuration for Tauri Desktop App
CLOUD_API_URL=https://app.alloomi.ai
NEXT_PUBLIC_CLOUD_API_URL=https://app.alloomi.ai
# Local development URL (for Tauri mode)
NEXT_PUBLIC_APP_URL=http://localhost:3415
LLM_BASE_URL=https://openrouter.ai/api/v1
LLM_MODEL=google/gemini-3-flash-preview
LLM_REASONING_MODEL=google/gemini-3-flash-preview
LLM_VISION_LANGUAGE_MODEL=google/gemini-3-flash-preview
LLM_IMAGE_MODEL=openai/gpt-5-image
LLM_EMBEDDING_MODEL=qwen/qwen3-embedding-4b
LLM_EMBEDDING_BASE_URL=https://openrouter.ai/api/v1
TELEGRAM_MODE=pooling
# Roles
ROLE_DETECTION_ENABLED=1
ROLE_OVERLAY_ANALYST_JOURNALIST=1
ROLE_OVERLAY_COMMUNITY_MANAGER=1
ROLE_OVERLAY_CUSTOMER_SUCCESS=1
ROLE_OVERLAY_EXECUTIVE=1
ROLE_OVERLAY_FREELANCER=1
ROLE_OVERLAY_INDIE_FOUNDER=1
ROLE_OVERLAY_INVESTOR_ADVISOR=1
ROLE_OVERLAY_REMOTE_WORKER=1
ROLE_OVERLAY_SALES_BIZDEV=1
ANTHROPIC_BASE_URL=http://localhost:3415/api/ai
API_TIMEOUT_MS=3000000
IS_TAURI=true
# iMessage Backend Mode
IMESSAGE_BACKEND_MODE=sdk
NEXT_PUBLIC_IMESSAGE_BACKEND_MODE=sdk
"@
$envContent | Out-File -FilePath ".env" -Encoding UTF8
- name: Build Tauri app (Windows)
working-directory: ./alloomi/apps/web
run: pnpm tauri:build
- name: Find .exe installer
id: exe
working-directory: ./alloomi/apps/web/src-tauri/target/release/bundle
run: |
$exe = Get-ChildItem -Path . -Recurse -Include "*.exe" | Select-Object -First 1
$newName = $exe.Name -replace 'amd64\.exe$', 'windows_amd64.exe'
Copy-Item $exe.FullName $newName
Write-Host "path=$newName" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding UTF8
Write-Host "full_path=$($exe.DirectoryName)\$newName" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding UTF8
- name: Upload Windows exe
uses: actions/upload-artifact@v4
with:
name: alloomi-windows
path: ${{ steps.exe.outputs.full_path }}
release:
needs: [get-version, build-tauri-macos, build-tauri-linux]
if: needs.get-version.outputs.version != ''
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download Apple Silicon DMG
uses: actions/download-artifact@v4
with:
name: alloomi-dmg-arm64
- name: Download Linux deb
uses: actions/download-artifact@v4
with:
name: alloomi-linux
- name: Create Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ needs.get-version.outputs.version }}
name: 'Alloomi ${{ needs.get-version.outputs.version }}'
body: 'See assets to download this version and install.'
draft: true
files: |
Alloomi*.dmg
*.deb
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update Homebrew Cask
run: |
# Find DMG file
DMG_FILE=$(ls Alloomi*macOS*.dmg)
# Extract version from filename (e.g., Alloomi_0.3.1_macOS_aarch64.dmg -> 0.3.1)
VERSION=$(echo "$DMG_FILE" | sed -E 's/Alloomi_([0-9.]+)_macOS_aarch64.dmg/\1/')
# Calculate SHA256
SHA256=$(sha256sum "$DMG_FILE" | awk '{print $1}')
# Update cask file
sed -i "s/version \"[^\"]*\"/version \"$VERSION\"/" Casks/alloomi.rb
sed -i "s/sha256 \"[^\"]*\"/sha256 \"$SHA256\"/" Casks/alloomi.rb
# Commit changes
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add Casks/alloomi.rb
git commit -m "chore: update Homebrew cask to v$VERSION" || echo "No changes to commit"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}