From a5c1c4ccc0827edae97c4c8f90cfd84c112b3ad1 Mon Sep 17 00:00:00 2001 From: ncpt <57245077+NoCrypt@users.noreply.github.com> Date: Tue, 30 Jul 2024 00:22:17 +0700 Subject: [PATCH 1/4] CI: auto rename --- .github/workflows/android.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index d732899..5c30fc7 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -78,6 +78,9 @@ jobs: # echo "BUILD_TOOL_VERSION=$BUILD_TOOL_VERSION" >> $GITHUB_ENV # echo Last build tool version is: $BUILD_TOOL_VERSION + - uses: little-core-labs/get-git-tag@v3.0.1 + id: tag_name + - uses: Wandalen/wretry.action@master name: Sign app APK id: sign_app @@ -90,6 +93,9 @@ jobs: keyAlias: ${{ secrets.ALIAS }} keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} keyPassword: ${{ secrets.KEY_PASSWORD }} + appName: Migu + appVersion: ${{ steps.tagName.outputs.tag }} + appPrefix: android - uses: jungwinter/split@v2 id: signed_files @@ -102,7 +108,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | git fetch --tags - gh release upload --clobber $(gh release list --limit 1 --json tagName --jq '.[0].tagName') ../${{ steps.signed_files.outputs._0 }} - gh release upload --clobber $(gh release list --limit 1 --json tagName --jq '.[0].tagName') ../${{ steps.signed_files.outputs._1 }} - gh release upload --clobber $(gh release list --limit 1 --json tagName --jq '.[0].tagName') ../${{ steps.signed_files.outputs._2 }} - gh release upload --clobber $(gh release list --limit 1 --json tagName --jq '.[0].tagName') ../${{ steps.signed_files.outputs._3 }} + gh release upload --clobber ${{ steps.tagName.outputs.tag }} ../${{ steps.signed_files.outputs._0 }} + gh release upload --clobber ${{ steps.tagName.outputs.tag }} ../${{ steps.signed_files.outputs._1 }} + gh release upload --clobber ${{ steps.tagName.outputs.tag }} ../${{ steps.signed_files.outputs._2 }} + gh release upload --clobber ${{ steps.tagName.outputs.tag }} ../${{ steps.signed_files.outputs._3 }} From af5fc9971924fd9ad7d0725fb8a359aa7875f9a9 Mon Sep 17 00:00:00 2001 From: ncpt <57245077+NoCrypt@users.noreply.github.com> Date: Tue, 30 Jul 2024 00:33:42 +0700 Subject: [PATCH 2/4] CI: get curr tag --- .github/workflows/android.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 5c30fc7..b868d08 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -78,8 +78,13 @@ jobs: # echo "BUILD_TOOL_VERSION=$BUILD_TOOL_VERSION" >> $GITHUB_ENV # echo Last build tool version is: $BUILD_TOOL_VERSION - - uses: little-core-labs/get-git-tag@v3.0.1 - id: tag_name + - name: Get Tag + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + GIT_CURR_TAG=$(gh release list --limit 1 --json tagName --jq '.[0].tagName' + echo "GIT_CURR_TAG=$GIT_CURR_TAG" >> $GITHUB_ENV + echo Last Tag is: $GIT_CURR_TAG - uses: Wandalen/wretry.action@master name: Sign app APK @@ -94,7 +99,7 @@ jobs: keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} keyPassword: ${{ secrets.KEY_PASSWORD }} appName: Migu - appVersion: ${{ steps.tagName.outputs.tag }} + appVersion: ${{ env.GIT_CURR_TAG }} appPrefix: android - uses: jungwinter/split@v2 @@ -108,7 +113,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | git fetch --tags - gh release upload --clobber ${{ steps.tagName.outputs.tag }} ../${{ steps.signed_files.outputs._0 }} - gh release upload --clobber ${{ steps.tagName.outputs.tag }} ../${{ steps.signed_files.outputs._1 }} - gh release upload --clobber ${{ steps.tagName.outputs.tag }} ../${{ steps.signed_files.outputs._2 }} - gh release upload --clobber ${{ steps.tagName.outputs.tag }} ../${{ steps.signed_files.outputs._3 }} + gh release upload --clobber ${{ env.GIT_CURR_TAG }} ../${{ steps.signed_files.outputs._0 }} + gh release upload --clobber ${{ env.GIT_CURR_TAG }} ../${{ steps.signed_files.outputs._1 }} + gh release upload --clobber ${{ env.GIT_CURR_TAG }} ../${{ steps.signed_files.outputs._2 }} + gh release upload --clobber ${{ env.GIT_CURR_TAG }} ../${{ steps.signed_files.outputs._3 }} From 677baf6bbfc99fabe5a612e91bd93dce369c58d3 Mon Sep 17 00:00:00 2001 From: ncpt <57245077+NoCrypt@users.noreply.github.com> Date: Tue, 30 Jul 2024 00:41:49 +0700 Subject: [PATCH 3/4] Update android.yml --- .github/workflows/android.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index b868d08..633c8f7 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -82,7 +82,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - GIT_CURR_TAG=$(gh release list --limit 1 --json tagName --jq '.[0].tagName' + GIT_CURR_TAG=$(gh release list --limit 1 --json tagName --jq '.[0].tagName') echo "GIT_CURR_TAG=$GIT_CURR_TAG" >> $GITHUB_ENV echo Last Tag is: $GIT_CURR_TAG @@ -91,7 +91,7 @@ jobs: id: sign_app with: attempt_limit: 3 - action: NoCrypt/sign-android@main + action: NoCrypt/sign-android@v1.0.2 with: | releaseDir: capacitor/android/app/build/outputs/apk/release signingKey: ${{ secrets.SIGNING_KEY }} From f83f1da5afa651e21a5061c605b63c64638ee8bf Mon Sep 17 00:00:00 2001 From: ncpt <57245077+NoCrypt@users.noreply.github.com> Date: Tue, 30 Jul 2024 09:55:37 +0700 Subject: [PATCH 4/4] Update android.yml --- .github/workflows/android.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 633c8f7..33d59da 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -91,7 +91,7 @@ jobs: id: sign_app with: attempt_limit: 3 - action: NoCrypt/sign-android@v1.0.2 + action: NoCrypt/sign-android@v1.0.3 with: | releaseDir: capacitor/android/app/build/outputs/apk/release signingKey: ${{ secrets.SIGNING_KEY }}