This commit is contained in:
@@ -90,6 +90,36 @@ jobs:
|
||||
VITE_LIVEKIT_URL: ${{ secrets.VITE_LIVEKIT_URL }}
|
||||
CUSTOM_APP_BUILDER_PATH: /tmp/app-builder
|
||||
|
||||
- name: Decode Android keystore
|
||||
run: |
|
||||
echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 -d > /tmp/discord-clone-release.keystore
|
||||
echo "ANDROID_KEYSTORE_FILE=/tmp/discord-clone-release.keystore" >> $GITHUB_ENV
|
||||
echo "ANDROID_KEYSTORE_PASSWORD=${{ secrets.ANDROID_KEYSTORE_PASSWORD }}" >> $GITHUB_ENV
|
||||
echo "ANDROID_KEY_ALIAS=${{ secrets.ANDROID_KEY_ALIAS }}" >> $GITHUB_ENV
|
||||
echo "ANDROID_KEY_PASSWORD=${{ secrets.ANDROID_KEY_PASSWORD }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Build web app for Android
|
||||
run: npm run build -w apps/web
|
||||
env:
|
||||
VITE_CONVEX_URL: ${{ secrets.VITE_CONVEX_URL }}
|
||||
VITE_LIVEKIT_URL: ${{ secrets.VITE_LIVEKIT_URL }}
|
||||
|
||||
- name: Capacitor sync
|
||||
run: npx cap sync
|
||||
working-directory: apps/android
|
||||
|
||||
- name: Build Android APK
|
||||
run: |
|
||||
cd apps/android/android
|
||||
chmod +x gradlew
|
||||
./gradlew assembleRelease --no-daemon
|
||||
|
||||
- name: Copy APK to dist
|
||||
run: |
|
||||
VERSION="${{ steps.version.outputs.version }}"
|
||||
cp apps/android/android/app/build/outputs/apk/release/app-release.apk \
|
||||
apps/electron/dist/DiscordClone-v${VERSION}.apk
|
||||
|
||||
- name: List build artifacts
|
||||
run: ls -la apps/electron/dist/
|
||||
|
||||
@@ -126,7 +156,8 @@ jobs:
|
||||
apps/electron/dist/*.exe \
|
||||
apps/electron/dist/*.exe.blockmap \
|
||||
apps/electron/dist/*.AppImage \
|
||||
apps/electron/dist/*.flatpak; do
|
||||
apps/electron/dist/*.flatpak \
|
||||
apps/electron/dist/*.apk; do
|
||||
[ -f "$file" ] || continue
|
||||
FILENAME=$(basename "$file")
|
||||
ENCODED_NAME=$(echo -n "$FILENAME" | jq -sRr @uri)
|
||||
|
||||
Reference in New Issue
Block a user