Google Play Release (Bundle Upload) #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Google Play Release (Bundle Upload) | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| versionCode: | |
| description: "Android versionCode" | |
| required: true | |
| versionName: | |
| description: "Android versionName" | |
| required: true | |
| jobs: | |
| build-and-upload: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # ----------------------------- | |
| # Checkout selected branch | |
| # ----------------------------- | |
| - name: Checkout branch | |
| uses: actions/checkout@v4 | |
| # ----------------------------- | |
| # Setup Java | |
| # ----------------------------- | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| cache: gradle | |
| # ----------------------------- | |
| # Decode signing keystore | |
| # ----------------------------- | |
| - name: Decode keystore | |
| run: | | |
| echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 --decode > release.keystore | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x ./gradlew | |
| # ----------------------------- | |
| # Build signed AAB | |
| # ----------------------------- | |
| - name: Build Release AAB | |
| run: | | |
| ./gradlew bundleRelease \ | |
| -PVERSION_CODE=${{ github.event.inputs.versionCode }} \ | |
| -PVERSION_NAME=${{ github.event.inputs.versionName }} | |
| env: | |
| KEYSTORE_PATH: release.keystore | |
| KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} | |
| KEY_ALIAS: ${{ secrets.RELEASE_SIGN_KEY_ALIAS }} | |
| KEY_PASSWORD: ${{ secrets.RELEASE_SIGN_KEY_PASSWORD }} | |
| # ----------------------------- | |
| # Upload to Google Play | |
| # ----------------------------- | |
| - name: Upload to Google Play | |
| uses: r0adkll/upload-google-play@v1 | |
| with: | |
| serviceAccountJsonPlainText: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }} | |
| packageName: com.fingerprintjs.android.fpjs_pro_demo | |
| releaseFiles: app/build/outputs/bundle/release/app-release.aab |