Build ReVanced Extended #75
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build ReVanced Extended | |
on: | |
workflow_dispatch: | |
jobs: | |
prepare-matrix: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- uses: actions/checkout@v4 | |
# - name: Install yq and jq | |
# run: | | |
# sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 | |
# sudo chmod +x /usr/local/bin/yq | |
# sudo apt-get install -y jq | |
- id: set-matrix | |
run: | | |
MATRIX=$(yq -o=json eval '.apps as $apps ireduce ([]; . + $apps | to_entries[] | | |
{"app": .key, "patchType": (.value.revanced | keys[])} | | |
select(.app != null and .patchType != null and .value.revanced[.patchType].enabled == true))' test.yaml) | |
echo "matrix=$MATRIX" >> $GITHUB_OUTPUT | |
build: | |
needs: prepare-matrix | |
name: Build ${{ matrix.app }} with ${{ matrix.patchType }} | |
permissions: write-all | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: ${{ fromJson(needs.prepare-matrix.outputs.matrix) }} | |
steps: | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: "zulu" | |
java-version: "17" | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install yq | |
run: | | |
sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 | |
sudo chmod +x /usr/local/bin/yq | |
- name: Install pup HTML parser | |
run: | | |
wget https://github.com/ericchiang/pup/releases/download/v0.4.0/pup_v0.4.0_linux_amd64.zip | |
unzip pup_v0.4.0_linux_amd64.zip -d /usr/local/bin | |
- name: Setup fetch script | |
run: | | |
chmod +x ./main.sh | |
chmod +x ./script.sh | |
chmod +x ./fetch_link.sh | |
ls | |
- name: Build app | |
run: | | |
./main.sh ${{ matrix.app }} ${{ matrix.patchType }} | |
- name: Upload APK | |
uses: actions/upload-artifact@v4 | |
with: | |
name: revanced-${{ matrix.app }}-${{ matrix.patchType }}-apk | |
path: revanced-${{ matrix.app }}-${{ matrix.patchType }}.apk |