-
Notifications
You must be signed in to change notification settings - Fork 6
99 lines (83 loc) · 2.47 KB
/
build_push.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
name: CI
on:
push:
branches:
- main
paths-ignore:
- '**.md'
- '.github/workflows/issue_moderator.yml'
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
env:
CI_CHUNK_SIZE: 65
jobs:
build_individual:
name: Build individual modules
runs-on: ubuntu-latest
steps:
- name: Checkout main branch
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 17
distribution: adopt
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Prepare signing key
run: |
echo ${{ secrets.SIGNING_KEY }} | base64 -d > signingkey.jks
- name: Build extensions (chunk ${{ matrix.chunk }})
env:
ALIAS: ${{ secrets.ALIAS }}
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
run: ./gradlew assembleRelease
- name: Upload APKs
uses: actions/upload-artifact@v4
if: "github.repository == 'suwayomi/tachiyomi-extension'"
with:
name: "individual-apks"
path: "**/*.apk"
retention-days: 1
- name: Clean up CI files
run: rm signingkey.jks
publish_repo:
name: Publish repo
needs:
- build_individual
if: "github.repository == 'suwayomi/tachiyomi-extension'"
runs-on: ubuntu-latest
steps:
- name: Download APK artifacts
uses: actions/download-artifact@v4
with:
path: ~/apk-artifacts
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 17
distribution: adopt
- name: Checkout main branch
uses: actions/checkout@v4
with:
ref: main
path: main
- name: Create repo artifacts
run: |
cd main
./.github/scripts/move-apks.sh
INSPECTOR_LINK="$(curl -s "https://api.github.com/repos/tachiyomiorg/tachiyomi-extensions-inspector/releases/latest" | jq -r '.assets[0].browser_download_url')"
curl -L "$INSPECTOR_LINK" -o ./Inspector.jar
java -jar ./Inspector.jar "apk" "output.json" "tmp"
./.github/scripts/create-repo.sh
- name: Checkout repo branch
uses: actions/checkout@v4
with:
ref: repo
path: repo
- name: Deploy repo
run: |
cd repo
../main/.github/scripts/commit-repo.sh