Skip to content

Commit f06d78c

Browse files
committed
Add Android APK build to CI workflow
- New tauri-android-preview job for PR builds - Installs Java 17, Android SDK, and Rust Android targets - Builds debug APK using Tauri - Uploads APK artifact for testing
1 parent 2fb37a5 commit f06d78c

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

.github/workflows/ci.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,67 @@ jobs:
108108
if-no-files-found: warn
109109
retention-days: 14
110110

111+
tauri-android-preview:
112+
name: Tauri Android preview (APK)
113+
runs-on: ubuntu-latest
114+
needs: node-ci
115+
if: ${{ github.event_name == 'pull_request' }}
116+
steps:
117+
- name: Checkout
118+
uses: actions/checkout@v5
119+
120+
- name: Setup Node
121+
uses: actions/setup-node@v5
122+
with:
123+
node-version-file: '.nvmrc'
124+
cache: 'yarn'
125+
126+
- name: Install dependencies
127+
run: yarn install --frozen-lockfile
128+
129+
- name: Setup Java 17
130+
uses: actions/setup-java@v4
131+
with:
132+
distribution: 'temurin'
133+
java-version: '17'
134+
135+
- name: Setup Android SDK
136+
uses: android-actions/setup-android@v3
137+
138+
- name: Install Rust
139+
uses: dtolnay/rust-toolchain@stable
140+
141+
- name: Install Rust Android targets
142+
run: |
143+
rustup target add aarch64-linux-android
144+
rustup target add armv7-linux-androideabi
145+
rustup target add i686-linux-android
146+
rustup target add x86_64-linux-android
147+
148+
- name: Build web assets (Vite)
149+
run: yarn build
150+
151+
- name: Build Tauri Android APK
152+
uses: tauri-apps/tauri-action@v0
153+
with:
154+
tauriScript: yarn tauri android build
155+
includeUpdaterJson: false
156+
157+
- name: Inspect Android bundle output
158+
if: always()
159+
run: |
160+
echo "Android APK artifacts:"
161+
find src-tauri/gen/android -type f -name "*.apk" -print || true
162+
163+
- name: Upload Android APK
164+
uses: actions/upload-artifact@v4
165+
with:
166+
name: android-apk
167+
path: |
168+
src-tauri/gen/android/app/build/outputs/apk/**/*.apk
169+
if-no-files-found: warn
170+
retention-days: 14
171+
111172
docker-build:
112173
name: Docker build (optional)
113174
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)