diff --git a/.github/workflows/BETA-patch.yml b/.github/workflows/BETA-patch.yml new file mode 100644 index 0000000..7a6bb29 --- /dev/null +++ b/.github/workflows/BETA-patch.yml @@ -0,0 +1,56 @@ +name: Patch Twitter +on: + workflow_dispatch: +jobs: + Twitter: + name: Patch Revanced + permissions: write-all + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up jdk + uses: actions/setup-java@v3.11.0 + with: + distribution: 'zulu' + java-version: '17' + + - name: Patch Twitter + run: bash src/build/twitter.sh + + - name: Generate release info + run: | + echo " + [![](https://visitcount.itsvg.in/api?id=Fioren&label=Visitors&color=6&icon=5&pretty=true)](https://visitcount.itsvg.in) + **Change log** :point_down: + [Revanced](https://github.com/revanced/revanced-patches/releases/latest) + [Revanced Extended](https://github.com/inotia00/revanced-patches/releases/latest) + "> ${{ github.workspace }}-CHANGELOG.txt + + - name: Release + uses: softprops/action-gh-release@v0.1.15 + with: + files: | + ./build/* + revanced-version.txt + name: Revanced & Revanced Extended + tag_name: all + body_path: ${{ github.workspace }}-CHANGELOG.txt + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Delete older releases + uses: dev-drprasad/delete-older-releases@v0.2.1 + with: + keep_latest: 1 + delete_tags: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Delete workflow runs + uses: Mattraks/delete-workflow-runs@v2 + with: + token: ${{ github.token }} + repository: ${{ github.repository }} + retain_days: 0 + keep_minimum_runs: 10 diff --git a/README.md b/README.md index 203ebe2..6034ac8 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,10 @@ [![Release](https://img.shields.io/github/v/release/inotia00/vancedmicrog?label=armeabi-v7a&style=for-the-badge)](https://github.com/inotia00/mMicroG/releases/latest/download/microg_armeabi-v7a.apk) +# [Twitter:](https://play.google.com/store/apps/details?id=com.twitter.android) + +[![Release](https://img.shields.io/github/downloads/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/all/total?label=Revanced&style=for-the-badge)](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/twitter-revanced.apk) + # [Instagram:](https://play.google.com/store/apps/details?id=com.instagram.android) [![Release](https://img.shields.io/github/downloads/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/all/total?label=Revanced&style=for-the-badge)](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/instagram-revanced.apk) diff --git a/src/build/tools.sh b/src/build/tools.sh index 36b678d..ba291cd 100644 --- a/src/build/tools.sh +++ b/src/build/tools.sh @@ -10,6 +10,21 @@ dl_gh() { done echo "All assets downloaded" } +dl_gh1() { + for repo in revanced-patches revanced-cli ; do + asset_urls=$(wget -qO- "https://api.github.com/repos/$1/$repo/releases/latest" \ + | jq -r '.assets[] | "\(.browser_download_url) \(.name)"') + while read -r url names + do + echo "Downloading $names from $url" + wget -q -O "$names" $url + done <<< "$asset_urls" + done +echo "All assets downloaded" +} +dl_revanced_integrations() { + curl --retry 10 --retry-max-time 60 -H "Cache-Control: no-cache" -fsSL github.com/$1/revanced-integrations/releases/download/v$2/revanced-integrations-$2.apk -o revanced-integrations-$2.apk +} get_patches_key() { EXCLUDE_PATCHES=() for word in $(cat src/patches/$1/exclude-patches) ; do diff --git a/src/build/twitter.sh b/src/build/twitter.sh new file mode 100644 index 0000000..9381322 --- /dev/null +++ b/src/build/twitter.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# Revanced build +source src/build/tools.sh + +dl_gh1 "revanced" +dl_revanced_integrations "revanced" "0.103.0" + +# Patch Twitter +get_patches_key "twitter" +version="9.86.0-release.0" +get_apk "twitter" "twitter" "twitter-inc/twitter/twitter" +patch "twitter" "twitter-revanced"