Skip to content

Build Release APK

Build Release APK #346

Workflow file for this run

name: Build Release APK
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: 'gradle'
- name: Setup Android SDK
uses: android-actions/setup-android@v3.2.1
- uses: gradle/actions/setup-gradle@v4
with:
build-scan-publish: true
build-scan-terms-of-use-url: "https://gradle.com/help/legal-terms-of-use"
build-scan-terms-of-use-agree: "yes"
# --- NAYA STEP: Keystore Decode Karna ---
- name: Decode Keystore
env:
ANDROID_SIGNING_KEY: ${{ secrets.ANDROID_SIGNING_KEY }}
run: |
echo "? Decoding Key..."
echo "$ANDROID_SIGNING_KEY" | tr -d '\n\r ' | base64 --decode > "${{ github.workspace }}/Mahesh.jks"
# --- UPDATED STEP: Fast Build aur Native Signing Ek Sath ---
- name: Build and Sign Release APKs
env:
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
ANDROID_ALIAS: ${{ secrets.ANDROID_ALIAS }}
ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}
run: |
./gradlew assembleRelease --parallel --build-cache --no-daemon \
-Pandroid.injected.signing.store.file="${{ github.workspace }}/Mahesh.jks" \
-Pandroid.injected.signing.store.password="$ANDROID_KEYSTORE_PASSWORD" \
-Pandroid.injected.signing.key.alias="$ANDROID_ALIAS" \
-Pandroid.injected.signing.key.password="$ANDROID_KEY_PASSWORD"
- name: Get version name
id: version
run: |
VERSION=$(grep -A 1 'val currentVersion: Version =' buildSrc/src/main/kotlin/Version.kt | grep -oP 'versionMajor = \K\d+' | head -1).$(grep -A 1 'val currentVersion: Version =' buildSrc/src/main/kotlin/Version.kt | grep -oP 'versionMinor = \K\d+' | head -1).$(grep -A 1 'val currentVersion: Version =' buildSrc/src/main/kotlin/Version.kt | grep -oP 'versionPatch = \K\d+' | head -1)
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
echo "Version: ${VERSION}"
- name: Read release configuration
id: release_config
run: |
SHOULD_RELEASE=$(jq -r '.release' release.json)
echo "SHOULD_RELEASE=${SHOULD_RELEASE}" >> $GITHUB_OUTPUT
echo "Release flag: ${SHOULD_RELEASE}"
if [ "${SHOULD_RELEASE}" = "true" ]; then
echo "? Release will be published"
else
echo "?? Release publishing is disabled - APKs will be uploaded as artifacts only"
fi
- name: List all APK files for debugging
run: |
echo "? All APK files in output directory:"
find app/build/outputs/apk -name "*.apk" -type f -exec ls -lh {} \;
echo ""
echo "? Directory structure:"
ls -R app/build/outputs/apk/
- name: Create Release
if: steps.release_config.outputs.SHOULD_RELEASE == 'true'
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.version.outputs.VERSION }}
name: Seal Plus v${{ steps.version.outputs.VERSION }}
body: |
## ✨ Seal Plus v2.5.0 - Hidden Content, Download Engine Reliability & Performance
---
### 🔒 Hidden Content & Privacy
* **Hidden Content Management System**
+ New **Hidden Content** page in the navigation drawer
+ Mark videos as hidden — relocated to a private isolated directory
+ Access requires PIN or biometric authentication
+ Optimistic UI — card vanishes instantly before the database write completes
### 🎨 Format Selection UI Overhaul
* **Redesigned Format Cards**
+ File size and bitrate shown in dedicated sections on every card
* **List View for Format Cards**
+ New list-style layout option — toggle in Settings → SealPlus Extras
* **Merge Audio Stream Option**
+ New toggle to merge a separate audio stream into the selected video format
* **Removed Suggested Section**
+ Cleaner format selection page without the "Suggested" section
* **Download Dialog Loading State**
+ Loading screen now shows a thumbnail alongside the progress indicator
### ⬇️ Download Engine Reliability
* **Auto-Retry on Network Error**
+ Up to **3 automatic retries** with 5-second backoff — shows `Retrying (1/3)...`
* **Resume Partial Downloads**
+ `--continue` always passed to yt-dlp — never restart an interrupted download from scratch
* **WiFi-Only Mode Fully Enforced**
+ Network restriction enforced inside the engine, queued tasks auto-resume on reconnect
* **Fixed Task ID Collision**
+ Downloading the same URL twice no longer silently overwrites the first task
### 📊 Download Progress UI
* **Active Download List Sorting** — stable order: Running → ReadyWithInfo → Idle → Paused → Canceled/Error → Completed
* **Speed & ETA on Home Cards** — live `2.50 MiB/s • ETA 00:03`
* **Merging Phase Detection** — cards show **"Merging..."** during post-processing
* **Fixed -1% / 0% Progress Bug** — smooth indeterminate animation before yt-dlp reports progress
### 🗂️ Other Fixes & Improvements
* **Missing File Detection** — grayed-out cards for deleted/moved files
* **Reduced CPU & Storage Writes** — near-zero overhead during active downloads
* **SSL Certificate Bypass** — ignore SSL certs for filtered networks (Netfree etc.) — thanks to @613avi
* **Code Cleanup** — removed unused imports across 24 source files (89 lines)
### 🌍 Translations
* **61 Languages Updated** — new merge-hint strings across all supported locales
* **Complete Hebrew Translation** — thanks to @613avi
* **Improved Turkish Translation** — thanks to @mikropsoft
---
### 📦 Installation
Download the appropriate APK for your device:
- **Universal APK**: Works on all devices (recommended)
- **arm64-v8a**: For 64-bit ARM devices (most modern phones)
- **armeabi-v7a**: For 32-bit ARM devices
- **x86_64**: For 64-bit x86 devices
- **x86**: For 32-bit x86 devices
### ✨ Key Features (v2.5)
- 🔒 **Hidden Content System** - Biometric vault with file relocation & optimistic UI
- 🎨 **List View & Redesigned Format Cards** - File size, bitrate, codec info at a glance
- 🔀 **Merge Audio Stream Option** - Combine separate audio into video
- 📋 **Active Download Sorting** - Stable order: Running → Queued → Paused → Done
- 🔄 **Auto-Retry on Network Error** - Up to 3 retries with 5s backoff
- ▶️ **Resume Partial Downloads** - Continue from where you left off
- 📶 **WiFi-Only Fully Enforced** - Engine-side, auto-resumes on reconnect
- 📊 **Speed & ETA on Home Cards** - Live download speed and time remaining
- 🔀 **Merging Phase Indicator** - "Merging..." shown during post-processing
- 🖼️ **Missing File Detection** - Grayed-out cards for deleted/moved files
- ⚡ **CPU & Storage Optimized** - Near-zero overhead during downloads
- 🌍 **61 Languages Updated** - New strings across all locales
- ⏯️ **Pause/Resume downloads** with queue support
- 🌐 Download from 1000+ sites via yt-dlp
### 📜 Full Changelog
See [CHANGELOG.md](https://github.com/MaheshTechnicals/Sealplus/blob/main/CHANGELOG.md) for complete version history.
---
Built on: ${{ github.event.head_commit.timestamp }}
Commit: ${{ github.sha }}
draft: false
prerelease: false
make_latest: true
files: |
app/build/outputs/apk/generic/release/*.apk
- name: Send Telegram Notification to Channel
if: steps.release_config.outputs.SHOULD_RELEASE == 'true'
continue-on-error: true
env:
TGTOKEN: ${{ secrets.TGTOKEN }}
TGCHANNEL: ${{ secrets.TGCHANNEL }}
run: |
# Skip if Telegram credentials are not configured
if [ -z "$TGTOKEN" ] || [ -z "$TGCHANNEL" ]; then
echo "?? Telegram notification skipped (TGTOKEN or TGCHANNEL not configured)"
exit 0
fi
echo "? Sending notification to Telegram Channel: $TGCHANNEL"
# Prepare the release URL
RELEASE_URL="https://github.com/${{ github.repository }}/releases/tag/v${{ steps.version.outputs.VERSION }}"
# Create a beautiful Telegram message with HTML formatting
MESSAGE="<b>🎉 New Release Available!</b> 🚀\n\n"
MESSAGE+="━━━━━━━━━━━━━━━━━━━━━━━\n\n"
MESSAGE+="📱 <b>App Name:</b> Seal Plus\n\n"
MESSAGE+="🏷️ <b>Version:</b> v${{ steps.version.outputs.VERSION }}\n\n"
MESSAGE+="━━━━━━━━━━━━━━━━━━━━━━━\n\n"
MESSAGE+="📋 <b>Changelog (v2.5):</b>\n\n"
MESSAGE+="<b>🔒 Hidden Content & Privacy</b>\n"
MESSAGE+=" ➤ New Hidden Content page — private biometric-protected vault\n"
MESSAGE+=" ➤ Hidden files relocated to isolated directory, invisible to file manager\n"
MESSAGE+=" ➤ Optimistic UI — card vanishes instantly before DB write completes\n\n"
MESSAGE+="<b>🎨 Format Selection UI Overhaul</b>\n"
MESSAGE+=" ➤ Redesigned Format Cards with file size and bitrate displayed\n"
MESSAGE+=" ➤ New List View option for format cards (toggle in SealPlus Extras)\n"
MESSAGE+=" ➤ New Merge Audio Stream toggle on the Format Page\n"
MESSAGE+=" ➤ Removed Suggested section for a cleaner layout\n"
MESSAGE+=" ➤ Download dialog shows thumbnail while fetching info\n\n"
MESSAGE+="<b>⬇️ Download Engine Reliability</b>\n"
MESSAGE+=" ➤ Auto-Retry on network error — up to 3 retries with 5s backoff\n"
MESSAGE+=" ➤ Resume partial downloads — --continue always passed to yt-dlp\n"
MESSAGE+=" ➤ WiFi-Only mode enforced inside the engine, auto-resumes on reconnect\n"
MESSAGE+=" ➤ Fixed task ID collision for duplicate URL downloads\n\n"
MESSAGE+="<b>📊 Download Progress UI</b>\n"
MESSAGE+=" ➤ Active download sorting: Running → ReadyWithInfo → Idle → Paused → Done\n"
MESSAGE+=" ➤ Speed &amp; ETA shown on home cards: 2.50 MiB/s • ETA 00:03\n"
MESSAGE+=" ➤ Cards correctly show Merging... during post-processing\n"
MESSAGE+=" ➤ Fixed -1% / 0% progress bug with smooth indeterminate animation\n\n"
MESSAGE+="<b>⚡ Performance &amp; Fixes</b>\n"
MESSAGE+=" ➤ Missing file detection — grayed-out cards for deleted/moved files\n"
MESSAGE+=" ➤ CPU &amp; storage writes reduced to near zero during downloads\n"
MESSAGE+=" ➤ SSL certificate bypass for filtered networks (Netfree etc.)\n"
MESSAGE+=" ➤ Removed &amp; cleaned up unused imports across 24 source files\n\n"
MESSAGE+="<b>🌍 Translations</b>\n"
MESSAGE+=" ➤ 61 languages updated with new merge-hint strings\n"
MESSAGE+=" ➤ Complete Hebrew translation — thanks to @613avi\n"
MESSAGE+=" ➤ Improved Turkish translation — thanks to @mikropsoft\n\n"
MESSAGE+="━━━━━━━━━━━━━━━━━━━━━━━\n\n"
MESSAGE+="✨ <b>Key Features (v2.5):</b>\n"
MESSAGE+="🔒 Hidden Content System — biometric vault with file relocation\n"
MESSAGE+="🎨 List View &amp; Redesigned Format Cards — size &amp; bitrate at a glance\n"
MESSAGE+="🔀 Merge Audio Stream Option\n"
MESSAGE+="📋 Active Download Sorting — stable, priority-based order\n"
MESSAGE+="🔄 Auto-Retry — 3 retries with 5s backoff\n"
MESSAGE+="▶️ Resume Partial Downloads\n"
MESSAGE+="📶 WiFi-Only fully engine-enforced\n"
MESSAGE+="📊 Speed &amp; ETA on home cards\n"
MESSAGE+="🖼️ Missing file detection\n"
MESSAGE+="⚡ CPU &amp; storage optimized\n"
MESSAGE+="🌍 61 languages updated\n"
MESSAGE+="⏯️ Pause/Resume with queue\n"
MESSAGE+="🌐 1000+ sites via yt-dlp\n\n"
MESSAGE+="━━━━━━━━━━━━━━━━━━━━━━━\n\n"
MESSAGE+="📦 <b>Available APKs:</b>\n"
MESSAGE+=" ➤ Universal (All devices)\n"
MESSAGE+=" ➤ arm64-v8a (Modern phones)\n"
MESSAGE+=" ➤ armeabi-v7a (Older phones)\n"
MESSAGE+=" ➤ x86_64 / x86 (Tablets)\n\n"
MESSAGE+="━━━━━━━━━━━━━━━━━━━━━━━\n\n"
MESSAGE+="🔗 <b>Download Now:</b>\n"
MESSAGE+="<a href=\"${RELEASE_URL}\">Click here to download v${{ steps.version.outputs.VERSION }}</a>\n\n"
MESSAGE+="━━━━━━━━━━━━━━━━━━━━━━━\n\n"
MESSAGE+="💡 <b>Note:</b> v2.5 brings a biometric-protected hidden content vault with optimistic UI, list view for format cards, active download sorting, auto-retry on network errors, yt-dlp resume support, WiFi-only fully enforced engine-side, live speed/ETA on cards, redesigned format cards with merge audio option, removed Suggested section, and near-zero CPU/storage overhead during downloads.\n\n"
MESSAGE+="🕐 <i>Released: $(date '+%B %d, %Y at %H:%M UTC')</i>"
# URL encode the message to avoid HTML parsing issues
MESSAGE_ENCODED=$(echo -ne "$MESSAGE" | jq -sRr @uri)
# Send ONLY to Channel
curl -s -X POST "https://api.telegram.org/bot${TGTOKEN}/sendMessage" \
-d "chat_id=${TGCHANNEL}" \
-d "text=${MESSAGE_ENCODED}" \
-d "parse_mode=HTML" \
-d "disable_web_page_preview=false" \
&& echo "? Telegram Channel notification sent successfully!" \
|| echo "? Failed to send Telegram notification"
- name: Upload Universal APK as Artifact
if: steps.release_config.outputs.SHOULD_RELEASE == 'false'
uses: actions/upload-artifact@v4
with:
name: SealPlus-${{ steps.version.outputs.VERSION }}-universal
path: app/build/outputs/apk/generic/release/*universal*.apk
if-no-files-found: warn
retention-days: 30
- name: Upload arm64-v8a APK as Artifact
if: steps.release_config.outputs.SHOULD_RELEASE == 'false'
uses: actions/upload-artifact@v4
with:
name: SealPlus-${{ steps.version.outputs.VERSION }}-arm64-v8a
path: app/build/outputs/apk/generic/release/*arm64-v8a*.apk
if-no-files-found: warn
retention-days: 30
- name: Upload armeabi-v7a APK as Artifact
if: steps.release_config.outputs.SHOULD_RELEASE == 'false'
uses: actions/upload-artifact@v4
with:
name: SealPlus-${{ steps.version.outputs.VERSION }}-armeabi-v7a
path: app/build/outputs/apk/generic/release/*armeabi-v7a*.apk
if-no-files-found: warn
retention-days: 30
- name: Upload x86_64 APK as Artifact
if: steps.release_config.outputs.SHOULD_RELEASE == 'false'
uses: actions/upload-artifact@v4
with:
name: SealPlus-${{ steps.version.outputs.VERSION }}-x86_64
path: app/build/outputs/apk/generic/release/*x86_64*.apk
if-no-files-found: warn
retention-days: 30
- name: Upload x86 APK as Artifact
if: steps.release_config.outputs.SHOULD_RELEASE == 'false'
uses: actions/upload-artifact@v4
with:
name: SealPlus-${{ steps.version.outputs.VERSION }}-x86
path: app/build/outputs/apk/generic/release/*x86*.apk
if-no-files-found: warn
retention-days: 30
- name: Upload Artifacts (Backup - Always)
if: steps.release_config.outputs.SHOULD_RELEASE == 'true'
uses: actions/upload-artifact@v4
with:
name: signed-apks-backup
path: app/build/outputs/apk/generic/release/*.apk
if-no-files-found: error
retention-days: 20