|
| 1 | +# GitHub Actions Workflow for Google Play Publishing |
| 2 | + |
| 3 | +This directory contains GitHub Actions workflow configurations for automating the build and deployment process of the |
| 4 | +Secure Camera app to Google Play. |
| 5 | + |
| 6 | +## Workflow: Publish to Play Store |
| 7 | + |
| 8 | +The `publish-to-play-store.yml` workflow automatically builds and publishes the app to Google Play when a new tag with |
| 9 | +the format `v*` (e.g., `v1.0.0`) is pushed to the repository. |
| 10 | + |
| 11 | +### Workflow Steps |
| 12 | + |
| 13 | +1. Checkout the code |
| 14 | +2. Set up JDK 11 |
| 15 | +3. Set up Ruby and install Fastlane |
| 16 | +4. Decode the Android keystore from a base64-encoded secret |
| 17 | +5. Build the release AAB with proper signing |
| 18 | +6. Decode the Google Play service account key |
| 19 | +7. Deploy to Google Play using Fastlane |
| 20 | + |
| 21 | +### Required Secrets |
| 22 | + |
| 23 | +The following secrets must be configured in your GitHub repository settings: |
| 24 | + |
| 25 | +1. **ENCODED_KEYSTORE**: Base64-encoded Android keystore file |
| 26 | + ```bash |
| 27 | + # Generate using: |
| 28 | + base64 -w 0 keystore.jks > keystore_base64.txt |
| 29 | + ``` |
| 30 | + |
| 31 | +2. **KEYSTORE_PASSWORD**: Password for the keystore |
| 32 | + |
| 33 | +3. **KEY_ALIAS**: Alias of the key in the keystore |
| 34 | + |
| 35 | +4. **KEY_PASSWORD**: Password for the key |
| 36 | + |
| 37 | +5. **PLAY_STORE_CONFIG_JSON**: Google Play service account JSON key file content |
| 38 | + - This is used by Fastlane to authenticate with Google Play |
| 39 | + - You need to create a service account in the Google Play Console with the appropriate permissions |
| 40 | + |
| 41 | +### How to Use |
| 42 | + |
| 43 | +1. Set up all the required secrets in your GitHub repository settings |
| 44 | +2. When you're ready to release a new version: |
| 45 | + - Update the version information in `gradle/libs.versions.toml` |
| 46 | + - Commit and push the changes |
| 47 | + - Create and push a new tag with the format `v1.0.0` (matching your version) |
| 48 | + ```bash |
| 49 | + git tag v1.0.0 |
| 50 | + git push origin v1.0.0 |
| 51 | + ``` |
| 52 | +3. The workflow will automatically trigger and deploy the app to Google Play |
| 53 | + |
| 54 | +### Troubleshooting |
| 55 | + |
| 56 | +If the workflow fails, check the following: |
| 57 | + |
| 58 | +1. Ensure all secrets are correctly configured |
| 59 | +2. Verify that the keystore is valid and contains the correct key |
| 60 | +3. Make sure the Google Play service account has the necessary permissions |
| 61 | +4. Check that the app's version code has been incremented since the last release |
0 commit comments