Tachiyomi-Extensions/.github/workflows/build_push.yml

108 lines
2.5 KiB
YAML
Raw Normal View History

2020-11-13 00:22:02 +00:00
name: CI
on:
push:
branches:
- master
paths-ignore:
- '**.md'
- '.github/workflows/issue_moderator.yml'
2024-01-09 00:41:44 +00:00
workflow_dispatch:
2020-11-13 00:22:02 +00:00
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
2022-06-05 00:55:39 +00:00
env:
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
uses: actions/checkout@v4
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
uses: actions/checkout@v4
2021-06-20 21:45:22 +00:00
- name: Set up JDK
2024-01-09 00:41:44 +00:00
uses: actions/setup-java@v3
2021-06-20 21:45:22 +00:00
with:
java-version: 17
distribution: temurin
2021-06-20 21:45:22 +00:00
- name: Prepare signing key
2021-06-20 21:45:22 +00:00
run: |
echo ${{ secrets.SIGNING_KEY }} | base64 -d > signingkey.jks
2021-06-20 21:45:22 +00:00
2024-01-09 03:14:00 +00:00
- name: Build extensions
uses: gradle/gradle-build-action@v2
2021-02-13 00:16:06 +00:00
env:
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
2020-11-13 00:22:02 +00:00
2024-01-09 03:14:00 +00:00
- name: Upload APKs
2024-01-09 00:41:44 +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"
path: "**/*.apk"
2021-06-20 21:45:22 +00:00
retention-days: 1
- 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-01-09 00:41:44 +00:00
uses: actions/download-artifact@v3
2021-06-20 21:45:22 +00:00
with:
path: ~/apk-artifacts
2021-06-20 21:45:22 +00:00
- name: Set up JDK
2024-01-09 00:41:44 +00:00
uses: actions/setup-java@v3
with:
2023-09-03 17:34:30 +00:00
java-version: 17
distribution: temurin
- name: Checkout master branch
uses: actions/checkout@v4
with:
ref: master
path: master
- name: Create repo artifacts
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')"
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
uses: actions/checkout@v4
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
rm -r ~/apk-artifacts