2020-11-13 00:22:02 +00:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2022-01-20 16:02:38 +00:00
|
|
|
paths-ignore:
|
|
|
|
- '**.md'
|
2023-02-20 18:19:39 +00:00
|
|
|
- '.github/workflows/issue_moderator.yml'
|
2024-01-09 00:41:44 +00:00
|
|
|
workflow_dispatch:
|
2020-11-13 00:22:02 +00:00
|
|
|
|
2022-08-15 19:30:38 +00:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2022-06-05 00:55:39 +00:00
|
|
|
env:
|
2022-06-05 15:35:24 +00:00
|
|
|
CI_CHUNK_SIZE: 65
|
2022-06-05 00:55:39 +00:00
|
|
|
|
2020-11-13 00:22:02 +00:00
|
|
|
jobs:
|
2022-06-05 00:55:39 +00:00
|
|
|
prepare:
|
|
|
|
name: Prepare job
|
2024-01-10 23:11:20 +00:00
|
|
|
runs-on: arch
|
2022-06-05 00:55:39 +00:00
|
|
|
env:
|
|
|
|
CI_MODULE_GEN: true
|
2020-11-13 00:22:02 +00:00
|
|
|
steps:
|
|
|
|
- name: Clone repo
|
2024-07-14 13:54:48 +00:00
|
|
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
2022-01-09 19:33:34 +00:00
|
|
|
|
2021-06-20 21:45:22 +00:00
|
|
|
build_individual:
|
|
|
|
name: Build individual modules
|
2022-06-05 00:55:39 +00:00
|
|
|
needs: prepare
|
2024-01-10 23:11:20 +00:00
|
|
|
runs-on: arch
|
2021-06-20 21:45:22 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout master branch
|
2024-07-14 13:54:48 +00:00
|
|
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
2021-06-20 21:45:22 +00:00
|
|
|
|
|
|
|
- name: Set up JDK
|
2024-03-17 00:49:41 +00:00
|
|
|
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
|
2021-06-20 21:45:22 +00:00
|
|
|
with:
|
2024-01-14 20:04:00 +00:00
|
|
|
java-version: 17
|
2024-01-15 08:24:21 +00:00
|
|
|
distribution: temurin
|
2021-06-20 21:45:22 +00:00
|
|
|
|
2022-06-10 17:32:18 +00:00
|
|
|
- name: Prepare signing key
|
2021-06-20 21:45:22 +00:00
|
|
|
run: |
|
2022-01-09 19:33:34 +00:00
|
|
|
echo ${{ secrets.SIGNING_KEY }} | base64 -d > signingkey.jks
|
2021-06-20 21:45:22 +00:00
|
|
|
|
2024-02-18 20:34:32 +00:00
|
|
|
- name: Set up Gradle
|
2024-07-14 13:54:48 +00:00
|
|
|
uses: gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda # v3.4.2
|
2024-02-18 20:34:32 +00:00
|
|
|
|
2024-01-09 03:14:00 +00:00
|
|
|
- name: Build extensions
|
2021-02-13 00:16:06 +00:00
|
|
|
env:
|
2022-01-09 19:33:34 +00:00
|
|
|
ALIAS: ${{ secrets.ALIAS }}
|
|
|
|
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
|
2024-01-09 00:41:44 +00:00
|
|
|
KEY_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
|
2024-02-13 22:59:46 +00:00
|
|
|
run: ./gradlew -p src assembleRelease
|
2024-02-18 20:34:32 +00:00
|
|
|
|
2020-11-13 00:22:02 +00:00
|
|
|
|
2024-01-09 03:14:00 +00:00
|
|
|
- name: Upload APKs
|
2024-07-14 14:11:31 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-06-20 21:45:22 +00:00
|
|
|
with:
|
2024-01-09 03:14:00 +00:00
|
|
|
name: "individual-apks"
|
2021-11-28 23:06:26 +00:00
|
|
|
path: "**/*.apk"
|
2021-06-20 21:45:22 +00:00
|
|
|
retention-days: 1
|
|
|
|
|
2022-01-09 19:33:34 +00:00
|
|
|
- name: Clean up CI files
|
|
|
|
run: rm signingkey.jks
|
|
|
|
|
2021-06-20 21:45:22 +00:00
|
|
|
publish_repo:
|
|
|
|
name: Publish repo
|
|
|
|
needs:
|
|
|
|
- build_individual
|
2024-01-10 23:11:20 +00:00
|
|
|
runs-on: arch
|
2021-06-20 21:45:22 +00:00
|
|
|
steps:
|
|
|
|
- name: Download APK artifacts
|
2024-07-14 14:11:31 +00:00
|
|
|
uses: actions/download-artifact@v3
|
2021-06-20 21:45:22 +00:00
|
|
|
with:
|
2021-11-28 23:06:26 +00:00
|
|
|
path: ~/apk-artifacts
|
2021-06-20 21:45:22 +00:00
|
|
|
|
2021-08-02 14:28:45 +00:00
|
|
|
- name: Set up JDK
|
2024-03-17 00:49:41 +00:00
|
|
|
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
|
2021-08-02 14:28:45 +00:00
|
|
|
with:
|
2023-09-03 17:34:30 +00:00
|
|
|
java-version: 17
|
2024-01-15 08:24:21 +00:00
|
|
|
distribution: temurin
|
2021-08-02 14:28:45 +00:00
|
|
|
|
2022-01-09 19:33:34 +00:00
|
|
|
- name: Checkout master branch
|
2024-07-14 13:54:48 +00:00
|
|
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
2022-01-09 19:33:34 +00:00
|
|
|
with:
|
|
|
|
ref: master
|
|
|
|
path: master
|
2021-11-28 23:06:26 +00:00
|
|
|
|
2022-01-09 19:33:34 +00:00
|
|
|
- name: Create repo artifacts
|
2021-08-02 14:28:45 +00:00
|
|
|
run: |
|
|
|
|
cd master
|
2024-02-04 02:07:54 +00:00
|
|
|
python ./.github/scripts/move-apks.py
|
|
|
|
INSPECTOR_LINK="$(curl -s "https://api.github.com/repos/keiyoushi/extensions-inspector/releases/latest" | jq -r '.assets[0].browser_download_url')"
|
2021-08-02 14:28:45 +00:00
|
|
|
curl -L "$INSPECTOR_LINK" -o ./Inspector.jar
|
2024-02-04 02:07:54 +00:00
|
|
|
java -jar ./Inspector.jar "repo/apk" "output.json" "tmp"
|
|
|
|
python ./.github/scripts/create-repo.py
|
2020-11-13 00:22:02 +00:00
|
|
|
|
|
|
|
- name: Checkout repo branch
|
2024-07-14 13:54:48 +00:00
|
|
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
2020-11-13 00:22:02 +00:00
|
|
|
with:
|
|
|
|
ref: repo
|
|
|
|
path: repo
|
|
|
|
|
|
|
|
- name: Deploy repo
|
|
|
|
run: |
|
|
|
|
cd repo
|
|
|
|
../master/.github/scripts/commit-repo.sh
|
2024-01-10 23:00:57 +00:00
|
|
|
rm -r ~/apk-artifacts
|