commit 1981ee63eab8b715e8eb3dbc68cd4ff19a8d4014 Author: Buduf Date: Tue Apr 9 16:20:35 2024 +0200 asd diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..86b9c8e --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,75 @@ +name: Build +on: + push: + branches: + - '**' + +jobs: + build: + name: Build + 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 version code + id: vars + run: | + VERSION_CODE=$(cat versionCode.txt) + echo "version_code=${VERSION_CODE}" + echo "version_code=${VERSION_CODE}" >> $GITHUB_OUTPUT + + - name: Get youtube apk + run: | + wget "https://d.apkpure.net/b/APK/com.google.android.youtube?versionCode=${{ steps.vars.outputs.version_code }}" \ + --progress=dot:mega \ + -O input.apk + + - 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[1] | .browser_download_url' | \ + wget --progress=dot -i - -O revanced-patches.jar + + - name: Get revanced-integrations + run: | + curl -s https://api.github.com/repos/ReVanced/revanced-integrations/releases/latest | \ + jq --raw-output '.assets[0] | .browser_download_url' | \ + wget --progress=dot -i - -O revanced-integrations.apk + + - name: Build youtube-revacned + run: | + java -jar revanced-cli.jar patch \ + -b revanced-patches.jar \ + -m revanced-integrations.apk \ + -o youtube-revanced.apk \ + input.apk + + - name: Create tag + run: | + git tag ${{ github.event.head_commit.message }} + git push --tags + + - name: Create release + uses: akkuman/gitea-release-action@v1 + env: + NODE_OPTIONS: '--experimental-fetch' + with: + files: |- + youtube-revanced.apk diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a1403ad --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +revanced-cli.jar +revanced-patches.jar +revanced-integrations.apk +input.apk + +youtube-revanced* diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..a3fb643 --- /dev/null +++ b/build.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +versionCode=$(cat versionCode.txt) + +wget "https://d.apkpure.com/b/APK/com.google.android.apps.youtube.music?versionCode=${versionCode}" \ + --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.jar + +curl -s https://api.github.com/repos/ReVanced/revanced-patches/releases/latest | \ + jq --raw-output '.assets[1] | .browser_download_url' | \ + wget --progress=dot -i - -O revanced-patches.jar + +curl -s https://api.github.com/repos/ReVanced/revanced-integrations/releases/latest | \ + jq --raw-output '.assets[0] | .browser_download_url' | \ + wget --progress=dot -i - -O revanced-integrations.apk + +java -jar revanced-cli.jar patch \ + -b revanced-patches.jar \ + -m revanced-integrations.apk \ + -o youtube-music-revanced.apk \ + input.apk diff --git a/versionCode.txt b/versionCode.txt new file mode 100644 index 0000000..d315f27 --- /dev/null +++ b/versionCode.txt @@ -0,0 +1 @@ +57652797