45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
name: Build Hianime and Push APK
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- Hianime-fix
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout branch
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: Hianime-fix
|
|
|
|
- name: Set up JDK
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: 17
|
|
distribution: temurin
|
|
|
|
- name: Give Gradle permission
|
|
run: chmod +x ./gradlew
|
|
|
|
- name: Build Hianime APK
|
|
run: ./gradlew :src:en:zoro:assembleDebug
|
|
|
|
- name: Copy built APK
|
|
run: |
|
|
mkdir -p out/apk/Hianime
|
|
cp src/en/zoro/build/outputs/apk/debug/*.apk out/apk/Hianime/
|
|
|
|
- name: Push to apk-builds branch
|
|
run: |
|
|
cd out
|
|
git init
|
|
git config user.name "GitHub Actions"
|
|
git config user.email "github-actions@users.noreply.github.com"
|
|
git add .
|
|
git commit -m "Built Hianime APK from Hianime-fix"
|
|
git branch -M apk-builds
|
|
git remote add origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
|
|
git push -f origin apk-builds
|