preping for github actions
This commit is contained in:
30
scripts/README.md
Normal file
30
scripts/README.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# Development Scripts
|
||||
|
||||
This directory contains helpful scripts for development and release management.
|
||||
|
||||
## prepare_signing_key.sh
|
||||
|
||||
This script helps you prepare your Android signing keystore for use with GitHub Actions by encoding it to Base64 format.
|
||||
|
||||
### Usage
|
||||
|
||||
```bash
|
||||
# Make the script executable
|
||||
chmod +x prepare_signing_key.sh
|
||||
|
||||
# Run the script with your keystore file path
|
||||
./prepare_signing_key.sh /path/to/your/keystore.jks
|
||||
```
|
||||
|
||||
The script will output the Base64-encoded keystore which you should add as a GitHub secret named `SIGNING_KEY`.
|
||||
|
||||
### Required GitHub Secrets
|
||||
|
||||
To enable automatic signing and releasing of APKs, add the following secrets to your GitHub repository:
|
||||
|
||||
1. `SIGNING_KEY`: The Base64-encoded keystore file (output from this script)
|
||||
2. `KEY_ALIAS`: The alias used in your keystore
|
||||
3. `KEY_STORE_PASSWORD`: The password for your keystore
|
||||
4. `KEY_PASSWORD`: The password for your key
|
||||
|
||||
Add these secrets at: https://github.com/YOUR-USERNAME/SimpleLogUpload/settings/secrets/actions
|
||||
32
scripts/prepare_signing_key.sh
Executable file
32
scripts/prepare_signing_key.sh
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
# This script helps encode your Android signing keystore for GitHub Actions secrets
|
||||
|
||||
# Check if a keystore file path is provided
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo "Usage: $0 <path-to-keystore>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
KEYSTORE_PATH="$1"
|
||||
|
||||
# Check if the keystore file exists
|
||||
if [ ! -f "$KEYSTORE_PATH" ]; then
|
||||
echo "Error: Keystore file not found at $KEYSTORE_PATH"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Encode the keystore file to base64
|
||||
BASE64_KEYSTORE=$(base64 -i "$KEYSTORE_PATH")
|
||||
|
||||
# Print the encoded value
|
||||
echo ""
|
||||
echo "Add the following value to your GitHub repository secrets as SIGNING_KEY:"
|
||||
echo ""
|
||||
echo "$BASE64_KEYSTORE"
|
||||
echo ""
|
||||
echo "You will also need to add these secrets:"
|
||||
echo "- KEY_ALIAS: Your keystore alias"
|
||||
echo "- KEY_STORE_PASSWORD: Your keystore password"
|
||||
echo "- KEY_PASSWORD: Your key password"
|
||||
echo ""
|
||||
echo "These values can be added at: https://github.com/YOUR-USERNAME/SimpleLogUpload/settings/secrets/actions"
|
||||
Reference in New Issue
Block a user