Update dependencies, fix issue_moderator, add build_pull_request.
Add dependabot.
This commit is contained in:
parent
a9412dd951
commit
255d257d0a
5 changed files with 220 additions and 10 deletions
10
.github/dependabot.yml
vendored
Normal file
10
.github/dependabot.yml
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
# Set update schedule for GitHub Actions
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
# Check for updates to GitHub Actions every week
|
||||
interval: "weekly"
|
||||
157
.github/workflows/build_dev_benchmark.yml
vendored
Normal file
157
.github/workflows/build_dev_benchmark.yml
vendored
Normal file
|
|
@ -0,0 +1,157 @@
|
|||
name: Dev-benchmark Builder
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev-benchmark
|
||||
# Manual trigger
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build dev-benchmark commit
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Clone repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up gradle
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
|
||||
- name: Setup Android SDK
|
||||
run: |
|
||||
${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager "build-tools;29.0.3"
|
||||
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: 17
|
||||
distribution: temurin
|
||||
|
||||
- name: Prepare build
|
||||
run: |
|
||||
set -e
|
||||
|
||||
git fetch --tags
|
||||
|
||||
prev_release_sha=$(git log --oneline --decorate --tags --no-walk --pretty='%C(auto)%h' | head -n 1)
|
||||
echo "PREV_RELEASE_SHA=$prev_release_sha" >> $GITHUB_ENV
|
||||
|
||||
current_sha=$(git log -1 --pretty='%C(auto)%h' | head -n 1)
|
||||
echo "CURRENT_SHA=$current_sha" >> $GITHUB_ENV
|
||||
|
||||
echo "COMMIT_LOGS<<{delimiter}
|
||||
$(curl -H "Accept: application/vnd.github.v3+json" \
|
||||
"https://api.github.com/repos/komikku-app/komikku/compare/$prev_release_sha...$current_sha" \
|
||||
| jq '[.commits[]|{message:(.commit.message | split("\n")), username:.author.login}]' \
|
||||
| jq -r '.[]|"- \(.message | first) (@\(.username))"')
|
||||
{delimiter}" >> $GITHUB_ENV
|
||||
|
||||
- name: Set CHANGELOG
|
||||
run: |
|
||||
changelog="$(git log ${{ env.PREV_RELEASE_SHA }}..${{ env.CURRENT_SHA }} --pretty=format:'{{changelogtext}}%s (@%an){{!changelogtext}}')"
|
||||
changelog="${changelog//$'%'/%25}"
|
||||
changelog="${changelog//$'\n'/}"
|
||||
changelog="${changelog//$'\r'/}"
|
||||
changelog="${changelog//$'<'/}"
|
||||
changelog="${changelog//$'>'/}"
|
||||
changelog="${changelog//$'&'/}"
|
||||
changelog="$(echo $changelog | sed -e 's/{{changelogtext}}/<changelogtext>/g')"
|
||||
changelog="$(echo $changelog | sed -e 's/{{!changelogtext}}/<\/changelogtext>/g')"
|
||||
changelog="<?xml version=\"1.0\" encoding=\"utf-8\"?><changelog bulletedList=\"true\"><changelogversion versionName=\"${{ github.run_number }}\" changeDate=\"\">$changelog</changelogversion></changelog>"
|
||||
echo "CHANGELOG=$changelog" >> $GITHUB_ENV
|
||||
|
||||
- name: Write Version.kt
|
||||
uses: DamianReeves/write-file-action@v1.3
|
||||
with:
|
||||
path: app/src/main/java/exh/Version.kt
|
||||
contents: 'package exh const val syDebugVersion: String = "${{ github.run_number }}"'
|
||||
write-mode: overwrite
|
||||
|
||||
- name: Write changelog_debug.xml
|
||||
uses: DamianReeves/write-file-action@v1.3
|
||||
with:
|
||||
path: app/src/main/res/raw/changelog_debug.xml
|
||||
contents: "${{ env.CHANGELOG }}"
|
||||
write-mode: overwrite
|
||||
|
||||
- name: Build app
|
||||
if: ${{ ! startsWith(github.ref, 'refs/tags/') && github.repository == 'komikku-app/komikku' }}
|
||||
run: ./gradlew assembleDevBenchmark testDevBenchmarkUnitTest --stacktrace
|
||||
|
||||
- name: Sign Android Release
|
||||
if: ${{ ! startsWith(github.ref, 'refs/tags/') && github.repository == 'komikku-app/komikku' }}
|
||||
uses: r0adkll/sign-android-release@v1
|
||||
with:
|
||||
releaseDirectory: app/build/outputs/apk/dev/benchmark
|
||||
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
|
||||
alias: ${{ secrets.ALIAS }}
|
||||
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
|
||||
keyPassword: ${{ secrets.KEY_PASSWORD }}
|
||||
|
||||
- name: Clean up build artifacts
|
||||
if: ${{ ! startsWith(github.ref, 'refs/tags/') && github.repository == 'komikku-app/komikku' }}
|
||||
run: |
|
||||
set -e
|
||||
|
||||
mv app/build/outputs/apk/dev/benchmark/app-dev-universal-benchmark-signed.apk Komikku-dev-${{ github.run_number }}.apk
|
||||
sha=`sha256sum Komikku-dev-${{ github.run_number }}.apk | awk '{ print $1 }'`
|
||||
echo "APK_UNIVERSAL_SHA=$sha" >> $GITHUB_ENV
|
||||
|
||||
cp app/build/outputs/apk/dev/benchmark/app-dev-arm64-v8a-benchmark-signed.apk Komikku-arm64-v8a-dev-${{ github.run_number }}.apk
|
||||
sha=`sha256sum Komikku-arm64-v8a-dev-${{ github.run_number }}.apk | awk '{ print $1 }'`
|
||||
echo "APK_ARM64_V8A_SHA=$sha" >> $GITHUB_ENV
|
||||
|
||||
cp app/build/outputs/apk/dev/benchmark/app-dev-armeabi-v7a-benchmark-signed.apk Komikku-armeabi-v7a-dev-${{ github.run_number }}.apk
|
||||
sha=`sha256sum Komikku-armeabi-v7a-dev-${{ github.run_number }}.apk | awk '{ print $1 }'`
|
||||
echo "APK_ARMEABI_V7A_SHA=$sha" >> $GITHUB_ENV
|
||||
|
||||
cp app/build/outputs/apk/dev/benchmark/app-dev-x86-benchmark-signed.apk Komikku-x86-dev-${{ github.run_number }}.apk
|
||||
sha=`sha256sum Komikku-x86-dev-${{ github.run_number }}.apk | awk '{ print $1 }'`
|
||||
echo "APK_X86_SHA=$sha" >> $GITHUB_ENV
|
||||
|
||||
cp app/build/outputs/apk/dev/benchmark/app-dev-x86_64-benchmark-signed.apk Komikku-x86_64-dev-${{ github.run_number }}.apk
|
||||
sha=`sha256sum Komikku-x86_64-dev-${{ github.run_number }}.apk | awk '{ print $1 }'`
|
||||
echo "APK_X86_64_SHA=$sha" >> $GITHUB_ENV
|
||||
|
||||
- name: Create release
|
||||
if: ${{ ! startsWith(github.ref, 'refs/tags/') && github.repository == 'komikku-app/komikku' }}
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
tag_name: dev-${{ github.run_number }}
|
||||
target_commitish: ${{ github.ref }}
|
||||
name: Komikku Development Benchmark Build ${{ github.run_number }}
|
||||
body: |
|
||||
### Commits
|
||||
|
||||
https://github.com/komikku-app/komikku/compare/${{ env.PREV_RELEASE_SHA }}...${{ env.CURRENT_SHA }}
|
||||
|
||||
${{ env.COMMIT_LOGS }}
|
||||
|
||||
---
|
||||
|
||||
### Checksums
|
||||
|
||||
| Variant | SHA-256 |
|
||||
| ------- | ------- |
|
||||
| Universal | ${{ env.APK_UNIVERSAL_SHA }} |
|
||||
| arm64-v8a | ${{ env.APK_ARM64_V8A_SHA }} |
|
||||
| armeabi-v7a | ${{ env.APK_ARMEABI_V7A_SHA }} |
|
||||
| x86 | ${{ env.APK_X86_SHA }} |
|
||||
| x86_64 | ${{ env.APK_X86_64_SHA }} |
|
||||
files: |
|
||||
Komikku-dev-${{ github.run_number }}.apk
|
||||
Komikku-arm64-v8a-dev-${{ github.run_number }}.apk
|
||||
Komikku-armeabi-v7a-dev-${{ github.run_number }}.apk
|
||||
Komikku-x86-dev-${{ github.run_number }}.apk
|
||||
Komikku-x86_64-dev-${{ github.run_number }}.apk
|
||||
draft: false
|
||||
prerelease: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
41
.github/workflows/build_pull_request.yml
vendored
Normal file
41
.github/workflows/build_pull_request.yml
vendored
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
name: PR build check
|
||||
on:
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- 'i18n/src/commonMain/resources/**/strings.xml'
|
||||
- 'i18n/src/commonMain/resources/**/plurals.xml'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build app
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Clone repo
|
||||
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
|
||||
|
||||
- name: Validate Gradle Wrapper
|
||||
uses: gradle/wrapper-validation-action@216d1ad2b3710bf005dc39237337b9673fd8fcd5 # v3.3.2
|
||||
|
||||
- name: Dependency Review
|
||||
uses: actions/dependency-review-action@5bbc3ba658137598168acb2ab73b21c432dd411b # v4.2.5
|
||||
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
|
||||
with:
|
||||
java-version: 17
|
||||
distribution: adopt
|
||||
|
||||
- name: Set up gradle
|
||||
uses: gradle/actions/setup-gradle@db19848a5fa7950289d3668fb053140cf3028d43 # v3.3.2
|
||||
|
||||
- name: Build app and run unit tests
|
||||
run: ./gradlew detekt assembleStandardRelease testReleaseUnitTest
|
||||
4
.github/workflows/build_push.yml
vendored
4
.github/workflows/build_push.yml
vendored
|
|
@ -53,7 +53,7 @@ jobs:
|
|||
echo "CHANGELOG=$changelog" >> $GITHUB_ENV
|
||||
|
||||
- name: Validate Gradle Wrapper
|
||||
uses: gradle/wrapper-validation-action@v2
|
||||
uses: gradle/wrapper-validation-action@v3
|
||||
|
||||
- name: Setup Android SDK
|
||||
run: |
|
||||
|
|
@ -132,7 +132,7 @@ jobs:
|
|||
|
||||
- name: Create release
|
||||
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'komikku-app/komikku'
|
||||
uses: softprops/action-gh-release@v1
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: ${{ env.VERSION_TAG }}
|
||||
name: Komikku ${{ env.VERSION_TAG }}
|
||||
|
|
|
|||
18
.github/workflows/issue_moderator.yml
vendored
18
.github/workflows/issue_moderator.yml
vendored
|
|
@ -11,7 +11,8 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Moderate issues
|
||||
uses: komikku-app/issue-moderator-action@v2.6.0
|
||||
uses: tachiyomiorg/issue-moderator-action@v2.6.0
|
||||
# uses: keiyoushi/issue-moderator-action@a017be83547db6e107431ce7575f53c1dfa3296a
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
duplicate-label: Duplicate
|
||||
|
|
@ -20,19 +21,14 @@ jobs:
|
|||
[
|
||||
{
|
||||
"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): \\?.*",
|
||||
"regex": ".*\\* (Komikku version|Android version|Device): \\?.*",
|
||||
"message": "Requested information in the template was not filled out."
|
||||
},
|
||||
{
|
||||
"type": "both",
|
||||
"regex": "^(?!.*myanimelist.*).*(aniyomi|anime).*$",
|
||||
"ignoreCase": true,
|
||||
"message": "Tachiyomi does not support anime, and has no plans to support anime. In addition Tachiyomi is not affiliated with Aniyomi https://github.com/jmir1/aniyomi"
|
||||
"message": "Komikku does not support anime, and has no plans to support anime. In addition Komikku is not affiliated with Aniyomi https://github.com/jmir1/aniyomi"
|
||||
},
|
||||
{
|
||||
"type": "both",
|
||||
|
|
@ -40,6 +36,12 @@ jobs:
|
|||
"ignoreCase": true,
|
||||
"labels": ["Cloudflare protected"],
|
||||
"message": "Refer to the **Solving Cloudflare issues** section at https://mihon.app/docs/guides/troubleshooting/#cloudflare. If it doesn't work, migrate to other sources or wait until they lower their protection."
|
||||
},
|
||||
{
|
||||
"type": "both",
|
||||
"regex": "^.*(myanimelist|mal).*$",
|
||||
"ignoreCase": true,
|
||||
"message": "For issues with linking MyAnimeList, please follow these steps:\n1. Update App to version 0.16.4 or newer\n2. Change your default User-Agent (`More → Settings → Advanced → Default user agent string`)\n3. Close and restart App\n4. Attempt to link MyAnimeList again\n\nIf you had MyAnimeList linked before, try to unlink it first before trying these steps."
|
||||
}
|
||||
]
|
||||
auto-close-ignore-label: do-not-autoclose
|
||||
|
|
|
|||
Loading…
Reference in a new issue