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-04-22 09:20:33 +00:00
|
|
|
SORA_API: ${{ secrets.SORA_API }}
|
2023-05-05 09:31:57 +00:00
|
|
|
SORAHE: ${{ secrets.SORAHE }}
|
|
|
|
SORAXA: ${{ secrets.SORAXA }}
|
|
|
|
SORATED: ${{ secrets.SORATED }}
|
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-08-18 20:48:57 +00:00
|
|
|
PRIMEWIRE_KEY: ${{ secrets.PRIMEWIRE_KEY }}
|
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-05-05 11:54:17 +00:00
|
|
|
run: |
|
|
|
|
cd $GITHUB_WORKSPACE/src
|
|
|
|
echo SORA_API=$SORA_API >> local.properties
|
2023-10-27 12:46:01 +00:00
|
|
|
echo TMDB_API=$TMDB_API >> local.properties
|
2023-05-05 11:54:17 +00:00
|
|
|
echo SORAHE=$SORAHE >> local.properties
|
|
|
|
echo SORAXA=$SORAXA >> local.properties
|
|
|
|
echo SORATED=$SORATED >> 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-08-18 20:48:57 +00:00
|
|
|
echo PRIMEWIRE_KEY=$PRIMEWIRE_KEY >> 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-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-05-08 04:25:50 +00:00
|
|
|
- name: Move Loklok
|
|
|
|
run: |
|
|
|
|
rm $GITHUB_WORKSPACE/builds/Loklok.cs3 || true
|
2023-05-08 13:09:48 +00:00
|
|
|
cp $GITHUB_WORKSPACE/builds/stored/Loklok.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
|