Learning project which also helps us to track our expenses
Firebase: Use conditions in Realtime Database Security Rules Stackoverflow: Access only for particular users
First, create an upload key.
Then, convert the key to base64:
openssl base64 < upload-keystore.jks | tr -d '\n' | tee upload-keystore.jks.base64.txt
Store as a secret in GitHub.
To create the keystore from the base64 string:
cat upload-keystore.jks.base64.txt | base64 --decode > upload-keystore.jks
Gradle config:
signingConfigs {
create("release") {
// You need to specify either an absolute path or include the
// keystore file in the same directory as the build.gradle file.
storeFile = file("upload-keystore.jks")
storePassword = System.getenv("UPLOAD_KEYSTORE_PASSWORD")
keyAlias = System.getenv("UPLOAD_KEYSTORE_KEY_ALIAS")
keyPassword = System.getenv("UPLOAD_KEYSTORE_KEY_PASSWORD")
}
}