Make release #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Make release | |
| permissions: | |
| contents: write | |
| on: | |
| push: | |
| tags: | |
| - 'v[0-9]+.[0-9]+.[0-9]+' | |
| - 'v[0-9]+.[0-9]+.[0-9]+-*' | |
| workflow_dispatch: | |
| inputs: | |
| tag_name: | |
| description: Tag to release | |
| required: true | |
| type: string | |
| jobs: | |
| release-for-github: | |
| name: "Release for GitHub" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'adopt' | |
| java-version: 17 | |
| - name: Make gradlew executable | |
| run: chmod +x ./gradlew | |
| - name: Build standard release with Gradle | |
| run: ./gradlew assembleStandardRelease --stacktrace | |
| - name: Build Play Store release with Gradle | |
| run: ./gradlew assemblePlaystoreRelease --stacktrace | |
| - name: Build F-Droid release with Gradle | |
| run: ./gradlew assembleFdroidRelease --stacktrace | |
| - name: Get tag name | |
| run: | | |
| if [[ "${GITHUB_REF}" == refs/tags/* ]]; then | |
| echo "VERSION_TAG=${GITHUB_REF#refs/tags/}" >> "$GITHUB_ENV" | |
| else | |
| echo "VERSION_TAG=${{ inputs.tag_name }}" >> "$GITHUB_ENV" | |
| fi | |
| - name: Verify build output | |
| run: | | |
| STANDARD_RELEASE_DIR="app/build/outputs/apk/standard/release" | |
| PLAYSTORE_RELEASE_DIR="app/build/outputs/apk/playstore/release" | |
| FDROID_RELEASE_DIR="app/build/outputs/apk/fdroid/release" | |
| if [ ! -d "$STANDARD_RELEASE_DIR" ]; then | |
| echo "Standard release directory does not exist!" | |
| find app/build/outputs -name "*.apk" -type f | |
| exit 1 | |
| fi | |
| if [ ! -d "$PLAYSTORE_RELEASE_DIR" ]; then | |
| echo "Play Store release directory does not exist!" | |
| find app/build/outputs -name "*.apk" -type f | |
| exit 1 | |
| fi | |
| if [ ! -d "$FDROID_RELEASE_DIR" ]; then | |
| echo "F-Droid release directory does not exist!" | |
| find app/build/outputs -name "*.apk" -type f | |
| exit 1 | |
| fi | |
| echo "Standard release APKs:" | |
| ls -lah "$STANDARD_RELEASE_DIR" | |
| echo "Play Store release APKs:" | |
| ls -lah "$PLAYSTORE_RELEASE_DIR" | |
| echo "F-Droid release APKs:" | |
| ls -lah "$FDROID_RELEASE_DIR" | |
| - name: Sign APKs | |
| run: | | |
| set -e | |
| STANDARD_RELEASE_DIR="app/build/outputs/apk/standard/release" | |
| PLAYSTORE_RELEASE_DIR="app/build/outputs/apk/playstore/release" | |
| FDROID_RELEASE_DIR="app/build/outputs/apk/fdroid/release" | |
| echo "${{ secrets.SIGNING_KEYSTORE }}" | base64 -d > release.keystore | |
| # Sign standard APKs | |
| APK_COUNT=$(find "$STANDARD_RELEASE_DIR" -name "app-standard-*-release-unsigned.apk" -type f | wc -l) | |
| if [ "$APK_COUNT" -eq 0 ]; then | |
| echo "No unsigned standard APK files found" | |
| ls -lah "$STANDARD_RELEASE_DIR" | |
| rm release.keystore | |
| exit 1 | |
| fi | |
| find "$STANDARD_RELEASE_DIR" -name "app-standard-*-release-unsigned.apk" -type f | while read -r apk; do | |
| signed_apk="${apk/-unsigned/}" | |
| $ANDROID_HOME/build-tools/34.0.0/apksigner sign \ | |
| --ks release.keystore \ | |
| --ks-key-alias "${{ secrets.SIGNING_KEY_ALIAS }}" \ | |
| --ks-pass "pass:${{ secrets.SIGNING_STORE_PASSWORD }}" \ | |
| --key-pass "pass:${{ secrets.KEY_PASSWORD }}" \ | |
| --out "$signed_apk" \ | |
| "$apk" | |
| $ANDROID_HOME/build-tools/34.0.0/apksigner verify "$signed_apk" | |
| rm "$apk" | |
| done | |
| # Sign Play Store APK (universal only) | |
| PLAYSTORE_APK="$PLAYSTORE_RELEASE_DIR/app-playstore-universal-release-unsigned.apk" | |
| if [ ! -f "$PLAYSTORE_APK" ]; then | |
| echo "No unsigned Play Store universal APK found" | |
| ls -lah "$PLAYSTORE_RELEASE_DIR" | |
| rm release.keystore | |
| exit 1 | |
| fi | |
| SIGNED_PLAYSTORE_APK="${PLAYSTORE_APK/-unsigned/}" | |
| $ANDROID_HOME/build-tools/34.0.0/apksigner sign \ | |
| --ks release.keystore \ | |
| --ks-key-alias "${{ secrets.SIGNING_KEY_ALIAS }}" \ | |
| --ks-pass "pass:${{ secrets.SIGNING_STORE_PASSWORD }}" \ | |
| --key-pass "pass:${{ secrets.KEY_PASSWORD }}" \ | |
| --out "$SIGNED_PLAYSTORE_APK" \ | |
| "$PLAYSTORE_APK" | |
| $ANDROID_HOME/build-tools/34.0.0/apksigner verify "$SIGNED_PLAYSTORE_APK" | |
| rm "$PLAYSTORE_APK" | |
| # Sign F-Droid APKs | |
| APK_COUNT=$(find "$FDROID_RELEASE_DIR" -name "app-fdroid-*-release-unsigned.apk" -type f | wc -l) | |
| if [ "$APK_COUNT" -eq 0 ]; then | |
| echo "No unsigned F-Droid APK files found" | |
| ls -lah "$FDROID_RELEASE_DIR" | |
| rm release.keystore | |
| exit 1 | |
| fi | |
| find "$FDROID_RELEASE_DIR" -name "app-fdroid-*-release-unsigned.apk" -type f | while read -r apk; do | |
| signed_apk="${apk/-unsigned/}" | |
| $ANDROID_HOME/build-tools/34.0.0/apksigner sign \ | |
| --ks release.keystore \ | |
| --ks-key-alias "${{ secrets.SIGNING_KEY_ALIAS }}" \ | |
| --ks-pass "pass:${{ secrets.SIGNING_STORE_PASSWORD }}" \ | |
| --key-pass "pass:${{ secrets.KEY_PASSWORD }}" \ | |
| --out "$signed_apk" \ | |
| "$apk" | |
| $ANDROID_HOME/build-tools/34.0.0/apksigner verify "$signed_apk" | |
| rm "$apk" | |
| done | |
| rm release.keystore | |
| echo "Standard APKs:" | |
| ls -lh "$STANDARD_RELEASE_DIR"/app-standard-*-release.apk | |
| echo "Play Store APK:" | |
| ls -lh "$PLAYSTORE_RELEASE_DIR"/app-playstore-universal-release.apk | |
| echo "F-Droid APKs:" | |
| ls -lh "$FDROID_RELEASE_DIR"/app-fdroid-*-release.apk | |
| - name: Copy build artifacts | |
| run: | | |
| set -euo pipefail | |
| # Standard flavor APKs | |
| standard_apks=("universal" "arm64-v8a" "armeabi-v7a" "x86" "x86_64") | |
| for abi in "${standard_apks[@]}"; do | |
| src="app/build/outputs/apk/standard/release/app-standard-${abi}-release.apk" | |
| dst="mpvRx-${abi}-${VERSION_TAG}.apk" | |
| if [ ! -f "$src" ]; then | |
| echo "::error file=$src::Signed standard APK for $abi was not found" | |
| exit 1 | |
| fi | |
| cp "$src" "$dst" | |
| checksum=$(sha256sum "$dst" | awk '{ print $1 }') | |
| varname="apk_${abi//-/_}_sha256" | |
| echo "$varname=$checksum" >> "$GITHUB_ENV" | |
| done | |
| # Play Store flavor APK (universal only) | |
| playstore_src="app/build/outputs/apk/playstore/release/app-playstore-universal-release.apk" | |
| playstore_dst="mpvRx-playstore-${VERSION_TAG}.apk" | |
| if [ ! -f "$playstore_src" ]; then | |
| echo "::error file=$playstore_src::Signed Play Store APK was not found" | |
| exit 1 | |
| fi | |
| cp "$playstore_src" "$playstore_dst" | |
| playstore_checksum=$(sha256sum "$playstore_dst" | awk '{ print $1 }') | |
| echo "apk_playstore_sha256=$playstore_checksum" >> "$GITHUB_ENV" | |
| # F-Droid flavor APK (only arm64-v8a, same package name) | |
| fdroid_src="app/build/outputs/apk/fdroid/release/app-fdroid-arm64-v8a-release.apk" | |
| fdroid_dst="mpvRx-fdroid-${VERSION_TAG}.apk" | |
| if [ ! -f "$fdroid_src" ]; then | |
| echo "::error file=$fdroid_src::Signed F-Droid APK was not found" | |
| exit 1 | |
| fi | |
| cp "$fdroid_src" "$fdroid_dst" | |
| fdroid_checksum=$(sha256sum "$fdroid_dst" | awk '{ print $1 }') | |
| echo "apk_fdroid_sha256=$fdroid_checksum" >> "$GITHUB_ENV" | |
| ls -lah mpvRx-*.apk | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ env.VERSION_TAG }} | |
| name: MpvRx ${{ env.VERSION_TAG }} | |
| body: | | |
| ## What's New in 1.3.0 | |
| - The project now carries the `MpvRx` name across the app, docs, and release files. | |
| - Tree View `NEW` labels now work properly and update as you watch. | |
| - Single-child folders now flatten automatically so you reach files faster. | |
| - Subtitle matching is smarter and better at finding subtitles that line up. | |
| - Cached library data shows up first, then refreshes quietly in the background. | |
| - Browser updates now react to changes instead of constantly polling. | |
| - The player now remembers your chosen aspect ratio. | |
| - Seeking feels steadier and cleanup after playback is smoother. | |
| - Ambient mode and Lua scripting were reverted. | |
| - The settings page was revamped. | |
| - New tab and video animations were added. | |
| - Icons were refreshed across the app. | |
| - Network and playlist behavior was cleaned up. | |
| - Folder pinning was added. | |
| - A video size downgrade option was added in the video editing section. | |
| - Page 6 was added to More Sheet for battery usage and extra system info. | |
| - A new status icon row can show network speed, battery percentage, and time. | |
| --- | |
| ### Checksums | |
| | Variant | SHA-256 | | |
| | ------- | ------- | | |
| | arm64-v8a | ${{ env.apk_arm64_v8a_sha256 }} | | |
| | armeabi-v7a | ${{ env.apk_armeabi_v7a_sha256 }} | | |
| | Universal | ${{ env.apk_universal_sha256 }} | | |
| | x86 | ${{ env.apk_x86_sha256 }} | | |
| | x86_64 | ${{ env.apk_x86_64_sha256 }} | | |
| | Play Store | ${{ env.apk_playstore_sha256 }} | | |
| | F-Droid | ${{ env.apk_fdroid_sha256 }} | | |
| --- | |
| ### Play Store Version | |
| The Play Store variant (`mpvRx-playstore-${{ env.VERSION_TAG }}.apk`) is specifically built for Google Play Store: | |
| - Universal APK supporting all architectures (arm64-v8a, armeabi-v7a, x86, x86_64) | |
| - Removed automatic update feature (handled by Play Store) | |
| - Minimal permissions for maximum compatibility | |
| --- | |
| ### F-Droid Version | |
| The F-Droid variant (`mpvRx-fdroid-${{ env.VERSION_TAG }}.apk`) is specifically built for F-Droid compatibility: | |
| - Removed automatic update feature | |
| - Removed install packages permission | |
| - ARM64-v8a architecture only | |
| files: | | |
| mpvRx-universal-${{ env.VERSION_TAG }}.apk | |
| mpvRx-arm64-v8a-${{ env.VERSION_TAG }}.apk | |
| mpvRx-armeabi-v7a-${{ env.VERSION_TAG }}.apk | |
| mpvRx-x86-${{ env.VERSION_TAG }}.apk | |
| mpvRx-x86_64-${{ env.VERSION_TAG }}.apk | |
| mpvRx-playstore-${{ env.VERSION_TAG }}.apk | |
| mpvRx-fdroid-${{ env.VERSION_TAG }}.apk | |
| draft: false | |
| prerelease: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |