2022-08-31 04:26:39 +00:00
|
|
|
name: Build
|
|
|
|
|
|
|
|
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#concurrency
|
2023-02-08 15:11:34 +00:00
|
|
|
concurrency:
|
2022-08-31 04:26:39 +00:00
|
|
|
group: "build"
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
# choose your default branch
|
|
|
|
- master
|
|
|
|
- main
|
|
|
|
paths-ignore:
|
|
|
|
- '*.md'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@master
|
|
|
|
with:
|
|
|
|
path: "src"
|
|
|
|
|
|
|
|
- name: Checkout builds
|
|
|
|
uses: actions/checkout@master
|
|
|
|
with:
|
|
|
|
ref: "builds"
|
|
|
|
path: "builds"
|
2023-02-08 15:11:34 +00:00
|
|
|
|
2022-08-31 04:26:39 +00:00
|
|
|
- name: Clean old builds
|
|
|
|
run: rm $GITHUB_WORKSPACE/builds/*.cs3 || true
|
|
|
|
|
|
|
|
- name: Setup JDK 11
|
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: 11
|
|
|
|
|
|
|
|
- name: Setup Android SDK
|
|
|
|
uses: android-actions/setup-android@v2
|
|
|
|
|
2023-05-05 09:31:57 +00:00
|
|
|
- name: Access Secrets
|
2023-04-22 07:30:47 +00:00
|
|
|
env:
|
2023-10-27 12:46:01 +00:00
|
|
|
TMDB_API: ${{ secrets.TMDB_API }}
|
2023-06-26 05:11:27 +00:00
|
|
|
DUMP_API: ${{ secrets.DUMP_API }}
|
|
|
|
DUMP_KEY: ${{ secrets.DUMP_KEY }}
|
2023-05-21 13:20:19 +00:00
|
|
|
CRUNCHYROLL_BASIC_TOKEN: ${{ secrets.CRUNCHYROLL_BASIC_TOKEN }}
|
|
|
|
CRUNCHYROLL_REFRESH_TOKEN: ${{ secrets.CRUNCHYROLL_REFRESH_TOKEN }}
|
2023-06-29 13:47:08 +00:00
|
|
|
ANICHI_API: ${{ secrets.ANICHI_API }}
|
|
|
|
ANICHI_SERVER: ${{ secrets.ANICHI_SERVER }}
|
|
|
|
ANICHI_ENDPOINT: ${{ secrets.ANICHI_ENDPOINT }}
|
|
|
|
ANICHI_APP: ${{ secrets.ANICHI_APP }}
|
2023-09-18 07:36:12 +00:00
|
|
|
ZSHOW_API: ${{ secrets.ZSHOW_API }}
|
2023-10-14 10:15:09 +00:00
|
|
|
SFMOVIES_API: ${{ secrets.SFMOVIES_API }}
|
2023-12-10 03:12:41 +00:00
|
|
|
CINEMATV_API: ${{ secrets.CINEMATV_API }}
|
2024-01-25 11:28:54 +00:00
|
|
|
GHOSTX_API: ${{ secrets.GHOSTX_API }}
|
2024-01-16 21:20:08 +00:00
|
|
|
SUPERSTREAM_FIRST_API: ${{ secrets.SUPERSTREAM_FIRST_API }}
|
|
|
|
SUPERSTREAM_SECOND_API: ${{ secrets.SUPERSTREAM_SECOND_API }}
|
|
|
|
SUPERSTREAM_THIRD_API: ${{ secrets.SUPERSTREAM_THIRD_API }}
|
|
|
|
SUPERSTREAM_FOURTH_API: ${{ secrets.SUPERSTREAM_FOURTH_API }}
|
2023-05-05 11:54:17 +00:00
|
|
|
run: |
|
|
|
|
cd $GITHUB_WORKSPACE/src
|
2023-10-27 12:46:01 +00:00
|
|
|
echo TMDB_API=$TMDB_API >> local.properties
|
2023-06-26 05:11:27 +00:00
|
|
|
echo DUMP_API=$DUMP_API >> local.properties
|
|
|
|
echo DUMP_KEY=$DUMP_KEY >> local.properties
|
2023-05-21 13:20:19 +00:00
|
|
|
echo CRUNCHYROLL_BASIC_TOKEN=$CRUNCHYROLL_BASIC_TOKEN >> local.properties
|
|
|
|
echo CRUNCHYROLL_REFRESH_TOKEN=$CRUNCHYROLL_REFRESH_TOKEN >> local.properties
|
2023-06-29 13:47:08 +00:00
|
|
|
echo ANICHI_API=$ANICHI_API >> local.properties
|
|
|
|
echo ANICHI_SERVER=$ANICHI_SERVER >> local.properties
|
|
|
|
echo ANICHI_ENDPOINT=$ANICHI_ENDPOINT >> local.properties
|
|
|
|
echo ANICHI_APP=$ANICHI_APP >> local.properties
|
2023-09-18 07:36:12 +00:00
|
|
|
echo ZSHOW_API=$ZSHOW_API >> local.properties
|
2023-10-14 10:15:09 +00:00
|
|
|
echo SFMOVIES_API=$SFMOVIES_API >> local.properties
|
2023-12-10 03:12:41 +00:00
|
|
|
echo CINEMATV_API=$CINEMATV_API >> local.properties
|
2024-01-25 01:33:20 +00:00
|
|
|
echo GHOSTX_API=$GHOSTX_API >> local.properties
|
2024-01-16 21:20:08 +00:00
|
|
|
echo SUPERSTREAM_FIRST_API=$SUPERSTREAM_FIRST_API >> local.properties
|
|
|
|
echo SUPERSTREAM_SECOND_API=$SUPERSTREAM_SECOND_API >> local.properties
|
|
|
|
echo SUPERSTREAM_THIRD_API=$SUPERSTREAM_THIRD_API >> local.properties
|
|
|
|
echo SUPERSTREAM_FOURTH_API=$SUPERSTREAM_FOURTH_API >> local.properties
|
2023-04-22 07:30:47 +00:00
|
|
|
|
2022-08-31 04:26:39 +00:00
|
|
|
- name: Build Plugins
|
|
|
|
run: |
|
|
|
|
cd $GITHUB_WORKSPACE/src
|
|
|
|
chmod +x gradlew
|
|
|
|
./gradlew make makePluginsJson
|
|
|
|
cp **/build/*.cs3 $GITHUB_WORKSPACE/builds
|
|
|
|
cp build/plugins.json $GITHUB_WORKSPACE/builds
|
|
|
|
|
2023-12-01 20:26:18 +00:00
|
|
|
- name: Move Kuramanime
|
2023-05-08 04:25:50 +00:00
|
|
|
run: |
|
2023-12-01 20:26:18 +00:00
|
|
|
rm $GITHUB_WORKSPACE/builds/KuramanimeProvider.cs3 || true
|
|
|
|
cp $GITHUB_WORKSPACE/builds/stored/KuramanimeProvider.cs3 $GITHUB_WORKSPACE/builds
|
2023-05-08 04:25:50 +00:00
|
|
|
|
2022-08-31 04:26:39 +00:00
|
|
|
- name: Push builds
|
|
|
|
run: |
|
|
|
|
cd $GITHUB_WORKSPACE/builds
|
|
|
|
git config --local user.email "actions@github.com"
|
|
|
|
git config --local user.name "GitHub Actions"
|
|
|
|
git add .
|
|
|
|
git commit --amend -m "Build $GITHUB_SHA" || exit 0 # do not error if nothing to commit
|
|
|
|
git push --force
|