-
Notifications
You must be signed in to change notification settings - Fork 181
100 lines (89 loc) · 3.45 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Build
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#concurrency
concurrency:
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"
- 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
- name: Access Secrets
env:
TMDB_API: ${{ secrets.TMDB_API }}
SORA_API: ${{ secrets.SORA_API }}
SORAHE: ${{ secrets.SORAHE }}
SORAXA: ${{ secrets.SORAXA }}
SORATED: ${{ secrets.SORATED }}
DUMP_API: ${{ secrets.DUMP_API }}
DUMP_KEY: ${{ secrets.DUMP_KEY }}
CRUNCHYROLL_BASIC_TOKEN: ${{ secrets.CRUNCHYROLL_BASIC_TOKEN }}
CRUNCHYROLL_REFRESH_TOKEN: ${{ secrets.CRUNCHYROLL_REFRESH_TOKEN }}
ANICHI_API: ${{ secrets.ANICHI_API }}
ANICHI_SERVER: ${{ secrets.ANICHI_SERVER }}
ANICHI_ENDPOINT: ${{ secrets.ANICHI_ENDPOINT }}
ANICHI_APP: ${{ secrets.ANICHI_APP }}
PRIMEWIRE_KEY: ${{ secrets.PRIMEWIRE_KEY }}
ZSHOW_API: ${{ secrets.ZSHOW_API }}
SFMOVIES_API: ${{ secrets.SFMOVIES_API }}
run: |
cd $GITHUB_WORKSPACE/src
echo SORA_API=$SORA_API >> local.properties
echo TMDB_API=$TMDB_API >> local.properties
echo SORAHE=$SORAHE >> local.properties
echo SORAXA=$SORAXA >> local.properties
echo SORATED=$SORATED >> local.properties
echo DUMP_API=$DUMP_API >> local.properties
echo DUMP_KEY=$DUMP_KEY >> local.properties
echo CRUNCHYROLL_BASIC_TOKEN=$CRUNCHYROLL_BASIC_TOKEN >> local.properties
echo CRUNCHYROLL_REFRESH_TOKEN=$CRUNCHYROLL_REFRESH_TOKEN >> local.properties
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
echo PRIMEWIRE_KEY=$PRIMEWIRE_KEY >> local.properties
echo ZSHOW_API=$ZSHOW_API >> local.properties
echo SFMOVIES_API=$SFMOVIES_API >> local.properties
- 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
- name: Move Kuramanime
run: |
rm $GITHUB_WORKSPACE/builds/KuramanimeProvider.cs3 || true
cp $GITHUB_WORKSPACE/builds/stored/KuramanimeProvider.cs3 $GITHUB_WORKSPACE/builds
- name: Push builds
run: |
cd $GITHUB_WORKSPACE/builds
git config --local user.email "[email protected]"
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