diff --git a/.github/workflows/build-artifact.yml b/.github/workflows/build-artifact.yml index bf18a1b..857e0eb 100644 --- a/.github/workflows/build-artifact.yml +++ b/.github/workflows/build-artifact.yml @@ -8,6 +8,11 @@ on: secrets: ENVS: required: false + inputs: + FILES_TO_EXPECT: + type: string + required: false + default: -1 jobs: build-apk: @@ -28,10 +33,11 @@ jobs: docker-compose up - name: Upload Build APKS - uses: actions/upload-artifact@v3.1.0 + uses: nikhilbadyal/upload-artifact@count-check with: name: Built-APKs path: | apks/*-output.apk apks/VancedMicroG.apk" if-no-files-found: error + files-to-expect: ${{ inputs.FILES_TO_EXPECT }} diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index 49291a0..d749f31 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -14,6 +14,8 @@ jobs: PYTHON_VERSION: '3.10' build-apk-pr-check: uses: ./.github/workflows/build-artifact.yml + with: + FILES_TO_EXPECT: 2 secrets: ENVS: | PATCH_APPS=youtube diff --git a/README.md b/README.md index c871546..b411bde 100644 --- a/README.md +++ b/README.md @@ -249,8 +249,13 @@ By default, script build the version as recommended by Revanced team. ```dotenv BRANDING_PATCH=custom-branding-icon-blue ``` - -12. Sample Envs ![envs] +12. You can build only for `arm64-v8a` devices in order to get smaller apk files.This can be done with by adding + `BUILD_ARM64_V8A_ONLY` in `ENVS` in `GitHub secrets` (Recommended) in the format. + ```dotenv + BUILD_ARM64_V8A_ONLY=True + ``` + Make sure you are using `revanced-extended` as `revanced` doesn't support this. +13. Sample Envs ![envs] ### Generate Token 1. Go to your account developer [settings](https://github.com/settings/tokens). Click on generate new token.
diff --git a/src/config.py b/src/config.py index 6bac9f2..8f37433 100644 --- a/src/config.py +++ b/src/config.py @@ -61,3 +61,4 @@ class RevancedConfig: "BRANDING_PATCH", "custom-branding-icon-blue" if self.build_extended else "custom-branding", ) + self.build_arm64_v8a_only = env.bool("BUILD_ARM64_V8A_ONLY", False) diff --git a/src/parser.py b/src/parser.py index c3ed9b2..64d1406 100644 --- a/src/parser.py +++ b/src/parser.py @@ -103,6 +103,13 @@ class Parser(object): if self._PATCHES: args.extend(self._PATCHES) + if self.config.build_extended and self.config.build_arm64_v8a_only: + args.append("--rip-lib") + args.append("armeabi-v7a") + args.append("--rip-lib") + args.append("x86") + args.append("--rip-lib") + args.append("x86_64") start = perf_counter() process = Popen(["java", *args], stdout=PIPE)