Overhaul 2025 (See PR for changes)

This commit is contained in:
Mio.
2025-06-27 23:44:38 +02:00
parent c52d8831aa
commit 965c2a4f43
81 changed files with 4404 additions and 2086 deletions

View File

@@ -1,25 +0,0 @@
name: "Batch close stale issues"
on:
# Monthly
schedule:
- cron: '0 0 1 * *'
# Manual trigger
workflow_dispatch:
inputs:
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
# Close everything older than a year
days-before-issue-stale: 365
days-before-issue-close: 0
exempt-issue-labels: "do-not-autoclose,Meta request"
close-issue-message: "In an effort to have a more manageable issue backlog, we're closing older requests that weren't addressed since there's a low chance of it being addressed if it hasn't already. If your request is still relevant, please [open a new request](https://github.com/tachiyomiorg/tachiyomi-extensions/issues/new/choose)."
close-issue-reason: not_planned
ascending: true
operations-per-run: 250

View File

@@ -1,10 +1,12 @@
name: PR build check
name: PR check
on:
pull_request:
paths-ignore:
- '**.md'
- '.github/workflows/issue_moderator.yml'
paths:
- '**'
- '!**.md'
- '!.github/**'
- '.github/workflows/build_pull_request.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
@@ -12,146 +14,59 @@ concurrency:
env:
CI_CHUNK_SIZE: 65
IS_PR_CHECK: true
jobs:
prepare:
name: Prepare job
runs-on: ubuntu-latest
runs-on: 'ubuntu-24.04'
outputs:
individualMatrix: ${{ steps.generate-matrices.outputs.individualMatrix }}
multisrcMatrix: ${{ steps.generate-matrices.outputs.multisrcMatrix }}
isIndividualChanged: ${{ steps.parse-changed-files.outputs.isIndividualChanged }}
isMultisrcChanged: ${{ steps.parse-changed-files.outputs.isMultisrcChanged }}
env:
CI_MODULE_GEN: true
matrix: ${{ steps.generate-matrices.outputs.matrix }}
delete: ${{ steps.generate-matrices.outputs.delete }}
steps:
- name: Clone repo
uses: actions/checkout@v4
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Set up JDK
uses: actions/setup-java@v4
- name: Checkout PR
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
java-version: 11
distribution: adopt
fetch-depth: 0
- id: get-changed-files
name: Get changed files
uses: Ana06/get-changed-files@v2.2.0
- id: parse-changed-files
name: Parse changed files
run: |
isIndividualChanged=0
isMultisrcChanged=0
for changedFile in ${{ steps.get-changed-files.outputs.all }}; do
if [[ ${changedFile} == src/* ]]; then
isIndividualChanged=1
elif [[ ${changedFile} == multisrc/* ]]; then
isMultisrcChanged=1
elif [[ ${changedFile} == .github/workflows/issue_moderator.yml ]]; then
true
elif [[ ${changedFile} == *.md ]]; then
true
else
isIndividualChanged=1
isMultisrcChanged=1
break
fi
done
echo "isIndividualChanged=$isIndividualChanged" >> $GITHUB_OUTPUT
echo "isMultisrcChanged=$isMultisrcChanged" >> $GITHUB_OUTPUT
- name: Generate multisrc sources
if: ${{ steps.parse-changed-files.outputs.isMultisrcChanged == '1' }}
uses: gradle/gradle-build-action@v2
- name: Set up Java
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
with:
arguments: :multisrc:generateExtensions
java-version: 17
distribution: temurin
- name: Get number of modules
run: |
set -x
./gradlew -q projects | grep '.*extensions\:\(individual\|multisrc\)\:.*\:.*' > projects.txt
echo "NUM_INDIVIDUAL_MODULES=$(cat projects.txt | grep '.*\:individual\:.*' | wc -l)" >> $GITHUB_ENV
echo "NUM_MULTISRC_MODULES=$(cat projects.txt | grep '.*\:multisrc\:.*' | wc -l)" >> $GITHUB_ENV
- name: Set up Gradle
uses: gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # v4.3.1
with:
cache-read-only: true
- id: generate-matrices
name: Create output matrices
uses: actions/github-script@v7
with:
script: |
const numIndividualModules = process.env.NUM_INDIVIDUAL_MODULES;
const numMultisrcModules = process.env.NUM_MULTISRC_MODULES;
const chunkSize = process.env.CI_CHUNK_SIZE;
name: Generate build matrices
run: |
python ./.github/scripts/generate-build-matrices.py origin/master Debug
const numIndividualChunks = Math.ceil(numIndividualModules / chunkSize);
const numMultisrcChunks = Math.ceil(numMultisrcModules / chunkSize);
console.log(`Individual modules: ${numIndividualModules} (${numIndividualChunks} chunks of ${chunkSize})`);
console.log(`Multi-source modules: ${numMultisrcModules} (${numMultisrcChunks} chunks of ${chunkSize})`);
core.setOutput('individualMatrix', { 'chunk': [...Array(numIndividualChunks).keys()] });
core.setOutput('multisrcMatrix', { 'chunk': [...Array(numMultisrcChunks).keys()] });
build_multisrc:
name: Build multisrc modules
build:
name: Build extensions (${{ matrix.chunk.number }})
needs: prepare
if: ${{ needs.prepare.outputs.isMultisrcChanged == '1' }}
runs-on: ubuntu-latest
runs-on: 'ubuntu-24.04'
if: ${{ toJson(fromJson(needs.prepare.outputs.matrix).chunk) != '[]' }}
strategy:
matrix: ${{ fromJSON(needs.prepare.outputs.multisrcMatrix) }}
matrix: ${{ fromJSON(needs.prepare.outputs.matrix) }}
steps:
- name: Checkout PR
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up JDK
uses: actions/setup-java@v4
- name: Set up Java
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
with:
java-version: 11
distribution: adopt
java-version: 17
distribution: temurin
- name: Generate sources from the multi-source library
uses: gradle/gradle-build-action@v2
env:
CI_MODULE_GEN: "true"
- name: Set up Gradle
uses: gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # v4.3.1
with:
arguments: :multisrc:generateExtensions
cache-read-only: true
- name: Build extensions (chunk ${{ matrix.chunk }})
uses: gradle/gradle-build-action@v2
env:
CI_MULTISRC: "true"
CI_CHUNK_NUM: ${{ matrix.chunk }}
with:
arguments: assembleDebug
cache-read-only: true
build_individual:
name: Build individual modules
needs: prepare
if: ${{ needs.prepare.outputs.isIndividualChanged == '1' }}
runs-on: ubuntu-latest
strategy:
matrix: ${{ fromJSON(needs.prepare.outputs.individualMatrix) }}
steps:
- name: Checkout PR
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 11
distribution: adopt
- name: Build extensions (chunk ${{ matrix.chunk }})
uses: gradle/gradle-build-action@v2
env:
CI_MULTISRC: "false"
CI_CHUNK_NUM: ${{ matrix.chunk }}
with:
arguments: assembleDebug
cache-read-only: true
- name: Build extensions (${{ matrix.chunk.number }})
run: |
./gradlew $(echo '${{ toJson(matrix.chunk.modules) }}' | jq -r 'join(" ")')

View File

@@ -3,10 +3,16 @@ name: CI
on:
push:
branches:
# - main
- master
paths-ignore:
- '**.md'
- '.github/workflows/issue_moderator.yml'
paths:
- '**'
- '!**.md'
- '!.github/**'
- '.github/scripts/**'
- '.github/workflows/build_push.yml'
# Manual trigger
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}
@@ -14,132 +20,149 @@ concurrency:
env:
CI_CHUNK_SIZE: 65
IS_PR_CHECK: false
jobs:
prepare:
name: Prepare job
runs-on: ubuntu-latest
runs-on: 'ubuntu-24.04'
outputs:
individualMatrix: ${{ steps.generate-matrices.outputs.individualMatrix }}
env:
CI_MODULE_GEN: true
latestCommitMessage: ${{ steps.set-env.outputs.LATEST_COMMIT_MESSAGE }}
matrix: ${{ steps.generate-matrices.outputs.matrix }}
delete: ${{ steps.generate-matrices.outputs.delete }}
steps:
- name: Clone repo
uses: actions/checkout@v4
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Set up JDK
uses: actions/setup-java@v4
- name: Checkout ${{ github.ref_name }} branch
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
java-version: 11
distribution: adopt
fetch-depth: 0
- name: Get number of modules
- name: Set env
id: set-env
run: |
set -x
./gradlew -q projects | grep '.*extensions\:\(individual\)\:.*\:.*' > projects.txt
echo "LATEST_COMMIT_MESSAGE<<{delimiter}
$(git log -1 --pretty=%B)
{delimiter}" >> $GITHUB_OUTPUT
echo "NUM_INDIVIDUAL_MODULES=$(cat projects.txt | grep '.*\:individual\:.*' | wc -l)" >> $GITHUB_ENV
- name: Set up Java
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
with:
java-version: 17
distribution: temurin
- name: Set up Gradle
uses: gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # v4.3.1
with:
cache-read-only: true
- name: Get last successful CI commit
id: last_successful_ci_commit
uses: nrwl/nx-set-shas@dbe0650947e5f2c81f59190a38512cf49126fe6b # v4.3.0
with:
main-branch-name: ${{ github.ref_name }}
- id: generate-matrices
name: Create output matrices
uses: actions/github-script@v7
with:
script: |
const numIndividualModules = process.env.NUM_INDIVIDUAL_MODULES;
const chunkSize = process.env.CI_CHUNK_SIZE;
run: |
python ./.github/scripts/generate-build-matrices.py ${{ steps.last_successful_ci_commit.outputs.base }} Release
const numIndividualChunks = Math.ceil(numIndividualModules / chunkSize);
console.log(`Individual modules: ${numIndividualModules} (${numIndividualChunks} chunks of ${chunkSize})`);
core.setOutput('individualMatrix', { 'chunk': [...Array(numIndividualChunks).keys()] });
build_individual:
name: Build individual modules
build:
name: Build extensions (${{ matrix.chunk.number }})
needs: prepare
runs-on: ubuntu-latest
runs-on: 'ubuntu-24.04'
if: ${{ toJson(fromJson(needs.prepare.outputs.matrix).chunk) != '[]' }}
strategy:
matrix: ${{ fromJSON(needs.prepare.outputs.individualMatrix) }}
matrix: ${{ fromJSON(needs.prepare.outputs.matrix) }}
steps:
- name: Checkout master branch
uses: actions/checkout@v4
- name: Checkout ${{ github.ref_name }} branch
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up JDK
uses: actions/setup-java@v4
- name: Set up Java
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
with:
java-version: 11
distribution: adopt
java-version: 17
distribution: temurin
- name: Set up Gradle
uses: gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # v4.3.1
with:
cache-read-only: ${{ matrix.chunk.number > 1 }}
- name: Prepare signing key
run: |
echo ${{ secrets.SIGNING_KEY }} | base64 -d > signingkey.jks
- name: Build extensions (chunk ${{ matrix.chunk }})
uses: gradle/gradle-build-action@v2
- name: Build extensions (${{ matrix.chunk.number }})
env:
CI_MULTISRC: "false"
CI_CHUNK_NUM: ${{ matrix.chunk }}
ALIAS: ${{ secrets.ALIAS }}
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
with:
arguments: assembleRelease
run: |
./gradlew $(echo '${{ toJson(matrix.chunk.modules) }}' | jq -r 'join(" ")')
- name: Upload APKs (chunk ${{ matrix.chunk }})
uses: actions/upload-artifact@v4
if: "github.repository == 'Kareadita/tach-extension'"
- name: Upload APKs (${{ matrix.chunk.number }})
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
if: github.repository == 'Kareadita/tach-extension'
with:
name: "individual-apks-${{ matrix.chunk }}"
name: "individual-apks-${{ matrix.chunk.number }}"
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 == 'Kareadita/tach-extension'"
runs-on: ubuntu-latest
publish:
name: Publish extension repo
needs: [prepare, build]
if: github.repository == 'Kareadita/tach-extension'
runs-on: 'ubuntu-24.04'
steps:
- name: Download APK artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
path: ~/apk-artifacts
- name: Set up JDK
uses: actions/setup-java@v4
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
with:
java-version: 17
distribution: adopt
distribution: temurin
- name: Checkout master branch
uses: actions/checkout@v4
- name: Checkout ${{ github.ref_name }} branch
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: master
path: master
ref: ${{ github.ref_name }}
path: ${{ github.ref_name }}
- name: Create repo artifacts
run: |
cd master
./.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')"
cd ${{ github.ref_name }}
python ./.github/scripts/move-built-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
java -jar ./Inspector.jar "apk" "output.json" "tmp"
./.github/scripts/create-repo.sh
java -jar ./Inspector.jar "repo/apk" "output.json" "tmp"
python ./.github/scripts/create-repo.py
- name: Checkout repo branch
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: yuzono/manga-repo
token: ${{ secrets.BOT_PAT }}
ref: repo
path: repo
- name: Deploy repo
- name: Merge repo
run: |
cd repo
../master/.github/scripts/commit-repo.sh
python ../${{ github.ref_name }}/.github/scripts/merge-repo.py '${{ needs.prepare.outputs.delete }}' '${{ github.ref_name }}/repo'
- name: Deploy repo
uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9
with:
message: "${{ needs.prepare.outputs.latestCommitMessage }}"
cwd: "./repo"
committer_name: github-actions[bot]
committer_email: github-actions[bot]@users.noreply.github.com
- name: Purge cached index on jsDelivr
run: |
curl https://purge.jsdelivr.net/gh/Kareadita/tach-extension@repo/index.min.json

View File

@@ -2,20 +2,32 @@ name: Issue moderator
on:
issues:
types: [opened, edited, reopened]
types: [ opened, edited, reopened ]
issue_comment:
types: [created]
types: [ created ]
jobs:
autoclose:
runs-on: ubuntu-latest
steps:
- name: Moderate issues
uses: tachiyomiorg/issue-moderator-action@v2
uses: keiyoushi/issue-moderator-action@a017be83547db6e107431ce7575f53c1dfa3296a
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
duplicate-label: Duplicate
blurbs: |
[
{
"keywords": ["cf", "cloudflare"],
"message": "Refer to the **Solving Cloudflare issues** section at https://yuzono.github.io/docs/guides/troubleshooting#cloudflare. If it doesn't work, migrate to other sources or wait until they lower their protection."
},
{
"keywords": ["uninstall"],
"message": "Uninstall the extension before updating. If that does not work, uninstall it from your device's settings by navigating to your device's Settings -> Apps and uninstall it from there by looking for `Tachiyomi: <extension name>`.\n\nThis is usually caused your previous extension having a different signature from the updated extension, making Android refuse to update it."
}
]
duplicate-check-enabled: true
duplicate-check-labels: |
["Source request", "Domain changed"]
@@ -23,51 +35,37 @@ jobs:
existing-check-enabled: true
existing-check-labels: |
["Source request", "Domain changed"]
existing-check-repo-url: https://raw.githubusercontent.com/yuzono/manga-repo/repo/index.min.json
auto-close-rules: |
[
{
"type": "body",
"regex": ".*DELETE THIS SECTION IF YOU HAVE READ AND ACKNOWLEDGED IT.*",
"message": "The acknowledgment section was not removed."
},
{
"type": "body",
"regex": ".*\\* (Tachiyomi version|Android version|Device): \\?.*",
"message": "Requested information in the template was not filled out."
},
{
"type": "title",
"regex": ".*(Source name|Short description).*",
"message": "You did not fill out the description in the title."
},
{
"type": "both",
"regex": ".*(hq\\s*dragon|manga\\s*host|supermangas|superhentais|union\\s*mangas|yes\\s*mangas|manhuascan|manhwahot|leitor\\.?net|manga\\s*livre|tsuki\\s*mangas|manga\\s*yabu|mangas\\.in|mangas\\.pw|hentaikai|toptoon\\+?|colamanhua|mangadig|hitomi\\.la|copymanga|neox|1manga\\.co|mangafox\\.fun|mangahere\\.onl|mangakakalot\\.fun|manganel(?!o)|mangaonline\\.fun|mangatoday|manga\\.town|onemanga\\.info|koushoku|ksk\\.moe|comikey|leercapitulo|c[uứ]u\\s*truy[eệ]n|day\\s*comics?|reaper\\s*scans|constellar\\s*scans|mode\\s*scanlator|bakai|japscan|izakaya|blackout\\s*comics|anchira).*",
"ignoreCase": true,
"labels": ["invalid"],
"message": "{match} will not be added back as it is too difficult to maintain. Read [this](https://github.com/tachiyomiorg/tachiyomi-extensions/blob/master/REMOVED_SOURCES.md) for more information."
},
{
"type": "both",
"regex": ".*(komiktap|gourmet\\s*scans|mangawow|hikari\\s*scans|knightnoscanlations|mangasy|nartag|xxx\\s*yaoi|luminous|hunters\\s*scan|reset(?:\\s*|-)scan|astra\\s*scans|manga(?:-|\\s*)pro|shinobiscans|plot ?twist ?no ?fansub(?: ?scans?)?|plot-twistnf-scans(?:\\.com)?|mhscans|aresmanga|realm ?scans?|mono ?manga|dat(?:\\s*|-)?gar\\s*scan|remangas|moon ?daisy(?: scans?)?).*",
"ignoreCase": true,
"labels": ["invalid"],
"message": "{match} will not be added back as the scanlator team has requested it to be removed. Read [this](https://github.com/tachiyomiorg/tachiyomi-extensions/blob/master/REMOVED_SOURCES.md) for more information."
},
{
"type": "both",
"regex": ".*(?:fail(?:ed|ure|s)?|can\\s*(?:no|')?t|(?:not|un).*able|(?<!n[o']?t )blocked by|error) (?:to )?(?:get past|by ?pass|penetrate)?.*cloud ?fl?are.*",
"regex": ".*(?:fail(?:ed|ure|s)?|can\\s*(?:no|')?t|(?:not|un).*able|(?<!n[o']?t )blocked by|error) (?:to )?(?:get past|by ?pass|penetrate)?.*cl[oa]ud ?fl?[ai]re.*",
"ignoreCase": true,
"labels": ["Cloudflare protected"],
"message": "Refer to the **Solving Cloudflare issues** section at https://tachiyomi.org/docs/guides/troubleshooting/#cloudflare. If it doesn't work, migrate to other sources or wait until they lower their protection."
"message": "Refer to the **Solving Cloudflare issues** section at https://yuzono.github.io/docs/guides/troubleshooting#cloudflare. If it doesn't work, migrate to other sources or wait until they lower their protection."
},
{
"type": "both",
"regex": ".*(slime\\s*read).*",
"regex": "remanga\\.org",
"ignoreCase": true,
"labels": ["invalid"],
"message": "{match} will not be added as they have relations to the Mangá Livre team. Read [this](https://github.com/tachiyomiorg/tachiyomi-extensions/blob/master/REMOVED_SOURCES.md) for more information."
"message": "ReManga (Russian) will not be added back as it has been removed [due to legal reasons](https://github.com/github/dmca)."
},
{
"type": "both",
"regex": "(kumanga\\.com)",
"ignoreCase": true,
"labels": ["invalid"],
"message": "{match} will not be added back as it is too difficult to maintain."
},
{
"type": "both",
"regex": "(centralnovel\\.com)",
"ignoreCase": true,
"labels": ["invalid"],
"message": "Novels aren't supported"
}
]
auto-close-ignore-label: do-not-autoclose

View File

@@ -8,11 +8,12 @@ on:
workflow_dispatch:
inputs:
jobs:
lock:
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v5
- uses: dessant/lock-threads@1bf7ec25051fe7c00bdd17e6a7cf3d7bfb7dc771 # v5.0.1
with:
github-token: ${{ github.token }}
issue-inactive-days: '2'