Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .github/workflows/build-apk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Build Android APK
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

jobs:
Expand All @@ -16,7 +18,7 @@ jobs:
with:
node-version: 20
cache: 'npm'
cache-dependency-path: App_369/package-lock.json
cache-dependency-path: package-lock.json

- name: 🏗 Setup Expo
uses: expo/expo-github-action@v8
Expand All @@ -26,9 +28,9 @@ jobs:
token: ${{ secrets.EXPO_TOKEN }}

- name: 📦 Install dependencies
working-directory: ./App_369
run: npm install
run: npm ci

- name: 🚀 Build APK
working-directory: ./App_369
run: eas build --platform android --profile preview --non-interactive
env:
EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}
run: npm run build:apk
73 changes: 73 additions & 0 deletions DEPLOY_APK.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# APK Distribution Runbook

This runbook covers generating and publishing the Android APK so users can install ASTRA MATRIX from your landing page.

## 1) Build the APK with EAS

Use the preview profile for downloadable APK output:

```bash
npm ci
npm run build:apk
```

Use production profile when you are ready for release-grade signing controls:

```bash
npm run build:apk:production
```

## 2) Retrieve the build artifact

After `eas build` completes, download the generated APK and rename it:

```bash
astra-matrix-latest.apk
```

## 2.5) Publish artifact + metadata in one command

Use the helper script to copy a real APK into the landing download path and generate checksum metadata:

```bash
scripts/publish-apk-release.sh /path/to/your-real.apk 1.0.0 2026-05-05T08:00:00Z "Initial public APK release"
```

This updates:

- `public/download/astra-matrix-latest.apk`
- `public/download/latest.json`

The landing page reads `latest.json` to show version/build date/size/SHA256.

## 3) Publish on your server

Upload the APK to your web root so it is publicly available at:

```text
/download/astra-matrix-latest.apk
```

Your landing page already links to this path.

## 4) Recommended web server headers for APK

Set these response headers for the APK file:

- `Content-Type: application/vnd.android.package-archive`
- `Content-Disposition: attachment; filename="astra-matrix-latest.apk"`

## 5) Post-release smoke test

From an Android device:

1. Open landing page
2. Tap **Download APK**
3. Install package
4. Launch app and verify startup scene renders without crash

## 6) Security and signing reminders

- Keep EAS signing credentials backed up and access-controlled.
- Never embed private keys or long-lived API secrets directly in the mobile client.
- If Gemini integration is required in production, use a backend proxy/API and not a raw client-side secret.
6 changes: 6 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"expo": {
"name": "App_369",
"owner": "psybrninja",
"slug": "app-369",
"version": "1.0.0",
"orientation": "portrait",
Expand All @@ -26,6 +27,11 @@
},
"web": {
"favicon": "./assets/favicon.png"
},
"extra": {
"eas": {
"projectId": "440a38e6-afe8-42f9-82a5-f9f987e5c44d"
}
}
}
}
Binary file added assets/adaptive-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion eas.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@
"buildType": "apk"
}
},
"production": {}
"production": {
"android": {
"buildType": "apk"
}
}
},
"submit": {
"production": {}
Expand Down
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@
"description": "",
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "node src/cli/index.js",
"start": "expo start",
"start:cli": "node src/cli/index.js",
"gui": "expo start",
"android": "expo start --android",
"build:apk": "eas build --platform android --profile preview",
"web": "expo start --web",
"build:web": "expo export --platform web",
"build:apk": "eas build --platform android --profile preview --non-interactive",
"build:apk:production": "eas build --platform android --profile production --non-interactive",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
Expand Down
9 changes: 9 additions & 0 deletions public/download/latest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"version": "0.0.0-placeholder",
"buildDate": "1970-01-01T00:00:00Z",
"fileName": "astra-matrix-latest.apk",
"fileSizeBytes": 0,
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"minAndroidSdk": 24,
"releaseNotes": "Placeholder artifact. Upload a real APK to publish a release."
}
Loading
Loading