mirror of
https://github.com/meowarex/rl-mobile.git
synced 2026-06-18 05:23:12 +10:00
0e22096780
- CI now uses APKEditor's merge command for proper resources.arsc + split merging (previous ad-hoc Java merge missed split-only resource entries like notification_icon, causing runtime Resources$NotFoundException) - ManifestPatcher: dynamically detect the original package name and rewrite every reference to it (permissions/provider authorities); drop split-only attributes (isSplitRequired, requiredSplitTypes, splitTypes) so the installer doesn't reject the merged APK with "Missing split" - SmaliPatchStep: extract extension/**/*.smali entries from patches.zip into the smali dir before assembly, so new helper classes (radiant/SparkleButton etc) actually end up in the patched dex - PMIntentReceiver / PMInstallerError: surface PackageInstaller EXTRA_STATUS_MESSAGE so install failures show Android's real reason instead of the generic enum label Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
76 lines
2.2 KiB
YAML
76 lines
2.2 KiB
YAML
name: "[main] Release"
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths-ignore:
|
|
- "**/*.md"
|
|
|
|
jobs:
|
|
Version:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
version: ${{ steps.set.outputs.version }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- id: set
|
|
run: |
|
|
BASE=$(cat .version | tr -d '[:space:]')
|
|
echo "version=$BASE.${{ github.run_number }}" >> $GITHUB_OUTPUT
|
|
|
|
Build:
|
|
needs: Version
|
|
uses: ./.github/workflows/build.yml
|
|
with:
|
|
version: ${{ needs.Version.outputs.version }}
|
|
secrets: inherit
|
|
|
|
Release:
|
|
name: Publish Release
|
|
needs: [Version, Build]
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
lfs: true
|
|
|
|
- name: Download artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: rl-mobile-artifacts
|
|
path: ./dist/
|
|
|
|
- name: Prepare release assets
|
|
run: |
|
|
mv ./dist/app-release.apk ./dist/rl-manager.apk
|
|
cp patches/data.json ./dist/data.json
|
|
cd patches && zip -r ../dist/patches.zip . -x "data.json" && cd ..
|
|
|
|
tidal_src=$(find tidal-apk -maxdepth 1 \( -name "*.apk" -o -name "*.apkm" \) | head -1)
|
|
if [ -z "$tidal_src" ]; then
|
|
echo "::error::No TIDAL .apk or .apkm found in tidal-apk/"
|
|
exit 1
|
|
fi
|
|
if [[ "$tidal_src" == *.apkm ]]; then
|
|
echo "Merging splits from $tidal_src via APKEditor"
|
|
curl -sLo /tmp/APKEditor.jar https://github.com/REAndroid/APKEditor/releases/download/V1.4.3/APKEditor-1.4.3.jar
|
|
java -jar /tmp/APKEditor.jar m -i "$tidal_src" -o ./dist/tidal-stock.apk
|
|
echo "Merged tidal-stock.apk:"
|
|
ls -la ./dist/tidal-stock.apk
|
|
else
|
|
cp "$tidal_src" ./dist/tidal-stock.apk
|
|
fi
|
|
|
|
- name: Publish release
|
|
uses: marvinpinto/action-automatic-releases@latest
|
|
with:
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
automatic_release_tag: latest
|
|
prerelease: false
|
|
title: v${{ needs.Version.outputs.version }}
|
|
files: ./dist/**
|