From 8261473923e940b28f31c963d520eed241951ed0 Mon Sep 17 00:00:00 2001 From: Cuong-Tran Date: Tue, 18 Jun 2024 23:48:53 +0700 Subject: [PATCH] [skip ci] update workflow --- .github/workflows/build_benchmark.yml | 3 +-- .github/workflows/build_check.yml | 16 +++++++++++++--- .github/workflows/build_preview.yml | 4 ++-- .github/workflows/build_release.yml | 2 +- README.md | 2 +- 5 files changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build_benchmark.yml b/.github/workflows/build_benchmark.yml index fd60ef64e2..5dd0f1e888 100644 --- a/.github/workflows/build_benchmark.yml +++ b/.github/workflows/build_benchmark.yml @@ -162,7 +162,7 @@ jobs: | armeabi-v7a | ${{ steps.get_sha.outputs.APK_ARMEABI_V7A_SHA }} | | x86 | ${{ steps.get_sha.outputs.APK_X86_SHA }} | | x86_64 | ${{ steps.get_sha.outputs.APK_X86_64_SHA }} | - + ## If you are unsure which apk to download then go with Komikku-${{ needs.prepare-build.outputs.TAG_PREFIX }}${{ needs.prepare-build.outputs.COMMIT_COUNT }}.apk files: | Komikku-${{ needs.prepare-build.outputs.TAG_PREFIX }}${{ needs.prepare-build.outputs.COMMIT_COUNT }}.apk @@ -174,4 +174,3 @@ jobs: prerelease: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - \ No newline at end of file diff --git a/.github/workflows/build_check.yml b/.github/workflows/build_check.yml index 420d2cf376..e38f703198 100644 --- a/.github/workflows/build_check.yml +++ b/.github/workflows/build_check.yml @@ -27,6 +27,8 @@ jobs: steps: - name: Clone repo uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + fetch-depth: 0 - name: Validate Gradle Wrapper uses: gradle/actions/wrapper-validation@31ae3562f68c96d481c31bc1a8a55cc1be162f83 # v3.4.1 @@ -70,10 +72,18 @@ jobs: keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} keyPassword: ${{ secrets.KEY_PASSWORD }} + - name: Rename apk + run: | + set -x + version_tag=${GITHUB_REF/refs\/heads\//} + commit_count=$(git rev-list --count HEAD) + echo "VERSION_TAG=$version_tag" >> $GITHUB_ENV + echo "COMMIT_COUNT=$commit_count" >> $GITHUB_ENV + mv app/build/outputs/apk/standard/preview/app-standard-universal-preview-signed.apk Komikku-$version_tag-r$commit_count.apk + - name: Upload APK - if: github.event_name != 'pull_request' uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 with: - name: Komikku-${{ github.sha }}.apk - path: app/build/outputs/apk/standard/preview/app-standard-universal-preview-signed.apk + name: Komikku-${{ env.VERSION_TAG }}-r${{ env.COMMIT_COUNT }}.apk + path: ./*.apk retention-days: 1 diff --git a/.github/workflows/build_preview.yml b/.github/workflows/build_preview.yml index 481839c98c..5fbeea00b9 100644 --- a/.github/workflows/build_preview.yml +++ b/.github/workflows/build_preview.yml @@ -83,7 +83,7 @@ jobs: with: java-version: 17 distribution: temurin - + - name: Write google-services.json uses: DamianReeves/write-file-action@6929a9a6d1807689191dcc8bbe62b54d70a32b42 # v1.3 with: @@ -182,7 +182,7 @@ jobs: | armeabi-v7a | ${{ steps.get_sha.outputs.APK_ARMEABI_V7A_SHA }} | | x86 | ${{ steps.get_sha.outputs.APK_X86_SHA }} | | x86_64 | ${{ steps.get_sha.outputs.APK_X86_64_SHA }} | - + ## If you are unsure which apk to download then go with Komikku-${{ needs.prepare-build.outputs.TAG_PREFIX }}${{ needs.prepare-build.outputs.COMMIT_COUNT }}.apk files: | Komikku-${{ needs.prepare-build.outputs.TAG_PREFIX }}${{ needs.prepare-build.outputs.COMMIT_COUNT }}.apk diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index 519368b821..9789b523bf 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -135,7 +135,7 @@ jobs: | armeabi-v7a | ${{ steps.get_sha.outputs.APK_ARMEABI_V7A_SHA }} | | x86 | ${{ steps.get_sha.outputs.APK_X86_SHA }} | | x86_64 | ${{ steps.get_sha.outputs.APK_X86_64_SHA }} | - + ## If you are unsure which apk to download then go with Komikku-${{ needs.build-app.outputs.VERSION_TAG }}.apk files: | Komikku-${{ needs.build-app.outputs.VERSION_TAG }}.apk diff --git a/README.md b/README.md index 27deeb5518..319433d619 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ | Releases | Preview | PR builds | Discussions | |----------|---------|-----------|-------------| -| [![GitHub downloads](https://img.shields.io/github/downloads/komikku-app/komikku/total?label=Downloads&labelColor=27303D&color=0D1117&logo=github&logoColor=FFFFFF&style=flat)](https://github.com/komikku-app/komikku/releases) [![Stable](https://img.shields.io/github/release/komikku-app/komikku.svg?maxAge=3600&label=Stable&labelColor=06599d&color=043b69)](https://github.com/komikku-app/komikku/releases/latest) [![Build](https://img.shields.io/github/actions/workflow/status/komikku-app/komikku/build_push.yml?labelColor=27303D)](https://github.com/komikku-app/komikku/actions/workflows/build_push.yml) | [![GitHub downloads](https://img.shields.io/github/downloads/komikku-app/komikku-preview/total?label=Downloads&labelColor=27303D&color=0D1117&logo=github&logoColor=FFFFFF&style=flat)](https://github.com/komikku-app/komikku-preview/releases) [![Beta](https://img.shields.io/github/v/release/komikku-app/komikku-preview.svg?maxAge=3600&label=Beta&labelColor=2c2c47&color=1c1c39)](https://github.com/komikku-app/komikku-preview/releases/latest) [![Beta build](https://img.shields.io/github/actions/workflow/status/komikku-app/komikku-preview/build_app.yml?labelColor=27303D)](https://github.com/komikku-app/komikku-preview/actions/workflows/build_app.yml) | [![CI](https://img.shields.io/github/actions/workflow/status/komikku-app/komikku/build_check.yml?labelColor=27303D)](https://github.com/komikku-app/komikku/actions/workflows/build_check.yml) | [![Discord](https://img.shields.io/discord/1242381704459452488?label=discord&labelColor=7289da&color=2c2f33&style=flat)](https://discord.gg/85jB7V5AJR) | +| [![GitHub downloads](https://img.shields.io/github/downloads/komikku-app/komikku/total?label=Downloads&labelColor=27303D&color=0D1117&logo=github&logoColor=FFFFFF&style=flat)](https://github.com/komikku-app/komikku/releases) [![Stable](https://img.shields.io/github/release/komikku-app/komikku.svg?maxAge=3600&label=Stable&labelColor=06599d&color=043b69)](https://github.com/komikku-app/komikku/releases/latest) [![Build](https://img.shields.io/github/actions/workflow/status/komikku-app/komikku/build_release.yml?labelColor=27303D)](https://github.com/komikku-app/komikku/actions/workflows/build_push.yml) | [![GitHub downloads](https://img.shields.io/github/downloads/komikku-app/komikku-preview/total?label=Downloads&labelColor=27303D&color=0D1117&logo=github&logoColor=FFFFFF&style=flat)](https://github.com/komikku-app/komikku-preview/releases) [![Beta](https://img.shields.io/github/v/release/komikku-app/komikku-preview.svg?maxAge=3600&label=Beta&labelColor=2c2c47&color=1c1c39)](https://github.com/komikku-app/komikku-preview/releases/latest) [![Beta build](https://img.shields.io/github/actions/workflow/status/komikku-app/komikku-preview/build_app.yml?labelColor=27303D)](https://github.com/komikku-app/komikku-preview/actions/workflows/build_app.yml) | [![CI](https://img.shields.io/github/actions/workflow/status/komikku-app/komikku/build_check.yml?labelColor=27303D)](https://github.com/komikku-app/komikku/actions/workflows/build_check.yml) | [![Discord](https://img.shields.io/discord/1242381704459452488?label=discord&labelColor=7289da&color=2c2f33&style=flat)](https://discord.gg/85jB7V5AJR) | # ![app icon](./.github/readme-images/app-icon.png) Komikku