1- # GitHub Actions Workflow for Google Play Publishing
1+ # GitHub Actions Workflows for App Publishing
22
33This directory contains GitHub Actions workflow configurations for automating the build and deployment process of the
4- Secure Camera app to Google Play.
4+ Secure Camera app to both Google Play and GitHub Releases .
55
6- ## Workflow: Publish to Play Store
6+ ## Workflow: Publish Releases
77
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.
8+ The ` publish-release .yml ` workflow automatically builds and publishes the app when a new tag with
9+ the format ` v* ` (e.g., ` v1.0.0 ` ) is pushed to the repository. It contains two jobs:
1010
11- ### Workflow Steps
11+ 1 . Build and publish to Play Store
12+ 2 . Build and publish GitHub release
13+
14+ ### Play Store Job Steps
1215
13161 . Checkout the code
14- 2 . Set up JDK 11
17+ 2 . Set up JDK 17
15183 . Set up Ruby and install Fastlane
16194 . Decode the Android keystore from a base64-encoded secret
17205 . Build the release AAB with proper signing
18216 . Decode the Google Play service account key
19227 . Deploy to Google Play using Fastlane
2023
24+ ### GitHub Release Job Steps
25+
26+ 1 . Checkout the code
27+ 2 . Set up JDK 17
28+ 3 . Decode a separate Android keystore from a base64-encoded secret
29+ 4 . Build a signed release APK
30+ 5 . Create a GitHub release
31+ 6 . Attach the APK to the release
32+
2133### Required Secrets
2234
35+ #### For Play Store Publishing
36+
2337The following secrets must be configured in your GitHub repository settings:
2438
25391 . ** ENCODED_KEYSTORE** : Base64-encoded Android keystore file
@@ -38,9 +52,28 @@ The following secrets must be configured in your GitHub repository settings:
3852 - This is used by Fastlane to authenticate with Google Play
3953 - You need to create a service account in the Google Play Console with the appropriate permissions
4054
55+ #### For GitHub Release Publishing
56+
57+ The following secrets must be configured in your GitHub repository settings:
58+
59+ 1 . ** GITHUB_RELEASE_ENCODED_KEYSTORE** : Base64-encoded Android keystore file (separate from Play Store keystore)
60+ ``` bash
61+ # Generate using:
62+ base64 -w 0 github_release_keystore.jks > github_release_keystore_base64.txt
63+ ```
64+
65+ 2 . ** GITHUB_RELEASE_KEYSTORE_PASSWORD** : Password for the GitHub release keystore
66+
67+ 3 . ** GITHUB_RELEASE_KEY_ALIAS** : Alias of the key in the GitHub release keystore
68+
69+ 4 . ** GITHUB_RELEASE_KEY_PASSWORD** : Password for the key in the GitHub release keystore
70+
4171### How to Use
4272
43- 1 . Set up all the required secrets in your GitHub repository settings
73+ 1 . Set up all the required secrets in your GitHub repository settings:
74+ - For Play Store publishing: ENCODED_KEYSTORE, KEYSTORE_PASSWORD, KEY_ALIAS, KEY_PASSWORD, PLAY_STORE_CONFIG_JSON
75+ - For GitHub release publishing: GITHUB_RELEASE_ENCODED_KEYSTORE, GITHUB_RELEASE_KEYSTORE_PASSWORD,
76+ GITHUB_RELEASE_KEY_ALIAS, GITHUB_RELEASE_KEY_PASSWORD
44772 . When you're ready to release a new version:
4578 - Update the version information in ` gradle/libs.versions.toml `
4679 - Commit and push the changes
@@ -49,13 +82,24 @@ The following secrets must be configured in your GitHub repository settings:
4982 git tag v1.0.0
5083 git push origin v1.0.0
5184 ```
52- 3 . The workflow will automatically trigger and deploy the app to Google Play
85+ 3 . The workflow will automatically trigger and:
86+ - Deploy the app to Google Play
87+ - Create a GitHub release with the signed APK attached
5388
5489### Troubleshooting
5590
5691If the workflow fails, check the following:
5792
58- 1 . Ensure all secrets are correctly configured
93+ #### For Play Store Publishing
94+
95+ 1 . Ensure all Play Store secrets are correctly configured
59962 . Verify that the keystore is valid and contains the correct key
60973 . Make sure the Google Play service account has the necessary permissions
61984 . Check that the app's version code has been incremented since the last release
99+
100+ #### For GitHub Release Publishing
101+
102+ 1 . Ensure all GitHub release secrets are correctly configured
103+ 2 . Verify that the GitHub release keystore is valid and contains the correct key
104+ 3 . Check that you have the necessary permissions to create releases in the repository
105+ 4 . Verify that the APK is being built correctly
0 commit comments