63 lines
1.7 KiB
YAML
63 lines
1.7 KiB
YAML
name: Build
|
|
on: [push]
|
|
|
|
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: 'temurin'
|
|
java-version: '21'
|
|
|
|
- name: Get version code
|
|
run: |
|
|
VERSION_CODE=$(cat versionCode.txt)
|
|
|
|
- name: Get youtube apk
|
|
run: |
|
|
wget "https://d.apkpure.net/b/APK/com.google.android.youtube?versionCode=${versionCode}" -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 -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 -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 -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 "$VERSION_CODE"
|
|
|
|
- name: Create release
|
|
uses: akkuman/gitea-release-action@v1
|
|
env:
|
|
NODE_OPTIONS: '--experimental-fetch'
|
|
with:
|
|
files: |-
|
|
youtube-revanced.apk
|