From bf9c51c0c20defb7027cf5adab975d9b07b2ed49 Mon Sep 17 00:00:00 2001 From: Yogesh Choudhary Paliyal Date: Sun, 13 Apr 2025 15:21:28 +0530 Subject: [PATCH 1/2] Modify version bump process --- .github/workflows/version-bump.yaml | 72 ++++++++++++++++++++++++++--- 1 file changed, 65 insertions(+), 7 deletions(-) diff --git a/.github/workflows/version-bump.yaml b/.github/workflows/version-bump.yaml index c7576a3e..8c1a78d9 100644 --- a/.github/workflows/version-bump.yaml +++ b/.github/workflows/version-bump.yaml @@ -22,10 +22,6 @@ jobs: steps: - uses: actions/checkout@v4 - # - name: Checkout - # run: | - # git checkout -b autoVersionBump - - name: 🏗 Bump App Version id: bump-app-version run: | @@ -47,6 +43,34 @@ jobs: - name: Print newVersion run: echo "${{ steps.bump-app-version.outputs.newVersion }}" + - name: Build Free Release AAB + id: buildFreeRelease + run: ./gradlew bundleFreeRelease + + - name: Build Pro Release AAB + id: buildProRelease + run: ./gradlew bundleProRelease + + - name: Sign Free AAB + id: signPro + uses: r0adkll/sign-android-release@fix/bundle-signing + with: + releaseDirectory: app/build/outputs/bundle/freeRelease + signingKeyBase64: ${{ secrets.SIGNING_KEY_WITH_PRO }} + alias: ${{ secrets.ALIAS }} + keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} + keyPassword: ${{ secrets.KEY_PASSWORD }} + + - name: Sign Pro AAB + id: sign + uses: r0adkll/sign-android-release@fix/bundle-signing + with: + releaseDirectory: app/build/outputs/bundle/proRelease + signingKeyBase64: ${{ secrets.SIGNING_KEY_WITH_PRO }} + alias: pro + keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} + keyPassword: ${{ secrets.KEY_PASSWORD }} + - name: Push to protected branch uses: CasperWA/push-protected@v2 with: @@ -59,7 +83,6 @@ jobs: git tag -a ${{ steps.bump-app-version.outputs.newVersion }} -m "Release version ${{ steps.bump-app-version.outputs.newVersion }}" git push origin ${{ steps.bump-app-version.outputs.newVersion }} - - name: Create Release uses: ncipollo/release-action@v1.16.0 with: @@ -69,6 +92,41 @@ jobs: discussionCategory: "Release feedbacks" makeLatest: true - # - name: Create Pull Request - # uses: peter-evans/create-pull-request@v5.0.0 + - uses: snnaplab/universal-apk-generate-action@v1 + id: apk-free-generate + with: + aab-path: 'app/build/outputs/bundle/freeRelease/app-free-release.aab' + keystore-base64: ${{ secrets.SIGNING_KEY_WITH_PRO }} + keystore-password: ${{ secrets.KEY_STORE_PASSWORD }} + key-alias: ${{ secrets.ALIAS }} + key-password: ${{ secrets.KEY_PASSWORD }} + - name: Upload free binaries to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ${{ steps.apk-free-generate.outputs.apk-path }} + asset_name: 'keypass-free-${{steps.bump-app-version.outputs.newVersion}}.apk' + tag: ${{ inputs.tag || github.ref_name }} + overwrite: true + + - name: Remove universal directory + run: rm -r /home/runner/work/snnaplab-universal-apk-generate-action + + - uses: snnaplab/universal-apk-generate-action@v1 + id: apk-pro-generate + with: + aab-path: 'app/build/outputs/bundle/proRelease/app-pro-release.aab' + keystore-base64: ${{ secrets.SIGNING_KEY_WITH_PRO }} + keystore-password: ${{ secrets.KEY_STORE_PASSWORD }} + key-alias: pro + key-password: ${{ secrets.KEY_PASSWORD }} + + - name: Upload pro binaries to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ${{ steps.apk-pro-generate.outputs.apk-path }} + tag: ${{ steps.bump-app-version.outputs.newVersion }} + asset_name: 'keypass-pro-${{ steps.bump-app-version.outputs.newVersion }}.apk' + overwrite: true From 4c0d369e1f0b1c682305fa728361577041565281 Mon Sep 17 00:00:00 2001 From: Yogesh Choudhary Paliyal Date: Sun, 13 Apr 2025 15:43:06 +0530 Subject: [PATCH 2/2] feat: minor changes --- .github/workflows/production.yml | 76 +++++++++++++++++++++++--------- 1 file changed, 56 insertions(+), 20 deletions(-) diff --git a/.github/workflows/production.yml b/.github/workflows/production.yml index b104b586..760296b5 100644 --- a/.github/workflows/production.yml +++ b/.github/workflows/production.yml @@ -1,11 +1,14 @@ name: Deploy App Play Store on: - push: -# branches: -# - master - tags: - - 'v*' + workflow_dispatch: + inputs: + version: + description: 'Github release version' + required: true + type: string + release: + types: [ published ] jobs: build: @@ -13,9 +16,42 @@ jobs: steps: - uses: actions/checkout@v4 - - - name: Setting up project - uses: ./.github/actions/setup + + - uses: robinraju/release-downloader@v1 + with: + # The github tag. e.g: v1.0.1 + # Download assets from a specific tag/version + tag: ${{ github.event.release.name || github.event.inputs.release }} + # The name of the file to download. + # Use this field only to specify filenames other than tarball or zipball, if any. + # Supports wildcard pattern (eg: '*', '*.deb', '*.zip' etc..) + fileName: 'keypass-free-*.apk' + # Relative path under $GITHUB_WORKSPACE to place the downloaded file(s) + # It will create the target directory automatically if not present + # eg: out-file-path: "my-downloads" => It will create directory $GITHUB_WORKSPACE/my-downloads + out-file-path: 'app/build/outputs/bundle/freeRelease' + # Github access token to download files from private repositories + # https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets + # eg: token: ${{ secrets.MY_TOKEN }} + token: ${{ secrets.GITHUB_TOKEN }} + + - uses: robinraju/release-downloader@v1 + with: + # The github tag. e.g: v1.0.1 + # Download assets from a specific tag/version + tag: ${{ github.event.release.name || github.event.inputs.release }} + # The name of the file to download. + # Use this field only to specify filenames other than tarball or zipball, if any. + # Supports wildcard pattern (eg: '*', '*.deb', '*.zip' etc..) + fileName: 'keypass-pro-*.apk' + # Relative path under $GITHUB_WORKSPACE to place the downloaded file(s) + # It will create the target directory automatically if not present + # eg: out-file-path: "my-downloads" => It will create directory $GITHUB_WORKSPACE/my-downloads + out-file-path: 'app/build/outputs/bundle/proRelease' + # Github access token to download files from private repositories + # https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets + # eg: token: ${{ secrets.MY_TOKEN }} + token: ${{ secrets.GITHUB_TOKEN }} - name: Build Free Release AAB id: buildFreeRelease @@ -73,15 +109,15 @@ jobs: status: inProgress whatsNewDirectory: whatsnew/ - - name: Deploy Free to Indus App Store - id: uploadToIndus - uses: yogeshpaliyal/upload-indus-appstore@v0.0.6 - with: - type: UPLOAD_AAB - apiKey: ${{secrets.INDUS_API_KEY}} - packageName: com.yogeshpaliyal.keypass - aabFile: app/build/outputs/bundle/freeRelease/*.aab - signingKeyBase64: ${{ secrets.SIGNING_KEY }} - keystoreAlias: ${{ secrets.ALIAS }} - keystorePassword: ${{ secrets.KEY_STORE_PASSWORD }} - keyPassword: ${{ secrets.KEY_PASSWORD }} +# - name: Deploy Free to Indus App Store +# id: uploadToIndus +# uses: yogeshpaliyal/upload-indus-appstore@v0.0.6 +# with: +# type: UPLOAD_AAB +# apiKey: ${{secrets.INDUS_API_KEY}} +# packageName: com.yogeshpaliyal.keypass +# aabFile: app/build/outputs/bundle/freeRelease/*.aab +# signingKeyBase64: ${{ secrets.SIGNING_KEY }} +# keystoreAlias: ${{ secrets.ALIAS }} +# keystorePassword: ${{ secrets.KEY_STORE_PASSWORD }} +# keyPassword: ${{ secrets.KEY_PASSWORD }}