commit 1844da463b5eb8d59cf425bb09ccc28d75f1db98 Author: Buduf Date: Tue Apr 9 16:20:35 2024 +0200 Initial commit diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..07df96a --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,66 @@ +name: Build +on: + issue_comment: + types: [created] + +jobs: + build: + name: Build + if: ${{ !gitea.event.issue.pull_request && gitea.event.issue.number == 1 }} + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: '11' + + - name: Install jq + run: apt update && apt install jq -y + + - name: Get youtube music apk + run: | + wget "https://my.buduf.win/APK/youtube-music-$VERSION.apk" \ + --progress=dot:mega \ + -O input.apk + env: + VERSION: ${{ gitea.event.comment.body }} + + - name: Get revanced-cli + run: | + curl -s https://api.github.com/repos/ReVanced/revanced-cli/releases/latest | \ + jq --raw-output '.assets[0] | .browser_download_url' | \ + wget --progress=dot:mega -i - -O revanced-cli.jar + + - name: Get revanced-patches + run: | + curl -s https://api.github.com/repos/ReVanced/revanced-patches/releases/latest | \ + jq --raw-output '.assets[0] | .browser_download_url' | \ + wget --progress=dot -i - -O revanced-patches.rvp + + - name: Build youtube-music-revacned + run: | + java -jar revanced-cli.jar patch \ + --custom-aapt2-binary lib/arm64-v8a/libaapt2.so \ + -p revanced-patches.rvp \ + -o youtube-music-revanced.apk \ + input.apk + + - name: Create tag + run: | + git tag "v$VERSION" + git push --tags + env: + VERSION: ${{ gitea.event.comment.body }} + + - name: Create release + uses: akkuman/gitea-release-action@v1 + env: + NODE_OPTIONS: '--experimental-fetch' + with: + files: |- + youtube-music-revanced.apk diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8c9e609 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +revanced-cli.jar +revanced-patches.rvp +input.apk + +youtube-music-revanced* diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..9da7670 --- /dev/null +++ b/build.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# Generic script, the repo uses gitea actions workflow + +wget "$1" \ + --progress=dot:mega \ + -O input.apk + +curl -s https://api.github.com/repos/ReVanced/revanced-cli/releases/latest | \ + jq --raw-output '.assets[0] | .browser_download_url' | \ + wget --progress=dot:mega -i - -O revanced-cli.rvp + +curl -s https://api.github.com/repos/ReVanced/revanced-patches/releases/latest | \ + jq --raw-output '.assets[0] | .browser_download_url' | \ + wget --progress=dot -i - -O revanced-patches.rvp + +java -jar revanced-cli.jar patch \ + --custom-aapt2-binary lib/arm64-v8a/libaapt2.so \ + -p revanced-patches.rvp \ + -o youtube-music-revanced.apk \ + input.apk diff --git a/lib/arm64-v8a/libaapt2.so b/lib/arm64-v8a/libaapt2.so new file mode 100755 index 0000000..a8d0f84 Binary files /dev/null and b/lib/arm64-v8a/libaapt2.so differ