From 69943b5ec1bb626427682af2beeece0087772f24 Mon Sep 17 00:00:00 2001 From: Buduf Date: Sat, 30 Mar 2024 18:29:08 +0100 Subject: [PATCH] v19.09.37 --- .gitea/workflows/build.yml | 75 ++++++++++++++++++++++++++++++++++++++ .gitignore | 6 +++ build.sh | 25 +++++++++++++ versionCode.txt | 1 + 4 files changed, 107 insertions(+) create mode 100644 .gitea/workflows/build.yml create mode 100644 .gitignore create mode 100755 build.sh create mode 100644 versionCode.txt diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..0af53f8 --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,75 @@ +name: Build +on: + push: + tags-ignore: + - '**' + +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..4e85265 --- /dev/null +++ b/build.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +versionCode=$(cat versionCode.txt) + +wget "https://d.apkpure.net/b/APK/com.google.android.youtube?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-revanced.apk \ + input.apk diff --git a/versionCode.txt b/versionCode.txt new file mode 100644 index 0000000..f62e457 --- /dev/null +++ b/versionCode.txt @@ -0,0 +1 @@ +1544809920