diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..b88e625 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,4 @@ +tidal-apk/*.apk filter=lfs diff=lfs merge=lfs -text +tidal-apk/*.apkm filter=lfs diff=lfs merge=lfs -text +patches/extension/**/*.smali text eol=lf +patches/*.patch text eol=lf diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 62c5fcd..53749f1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,14 +19,34 @@ jobs: 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: Rename APK - run: mv ./dist/app-release.apk ./dist/rl-manager.apk + - 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 "Extracting base.apk from $tidal_src" + unzip -p "$tidal_src" base.apk > ./dist/tidal-stock.apk + else + cp "$tidal_src" ./dist/tidal-stock.apk + fi - name: Publish release uses: marvinpinto/action-automatic-releases@latest diff --git a/patches/data.json b/patches/data.json index 4ad4d7f..7bcc858 100644 --- a/patches/data.json +++ b/patches/data.json @@ -1,5 +1,5 @@ { "tidalVersionCode": 9089, - "tidalApkUrl": "", + "tidalApkUrl": "https://github.com/meowarex/rl-mobile/releases/download/latest/tidal-stock.apk", "patchesVersion": "0.5.0" }