Skip to content

Commit 4b35e4e

Browse files
fix(ci): make sure that signing key doesn't include any whitespace before decoding
1 parent 63c9246 commit 4b35e4e

3 files changed

Lines changed: 109 additions & 5 deletions

File tree

.github/workflows/android-release.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,15 @@ jobs:
5555
uses: android-actions/setup-android@v3
5656

5757
- name: Decode keystore
58-
env:
59-
KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
6058
run: |
61-
echo "$KEYSTORE_BASE64" | base64 -d > android/app/release.keystore
62-
echo "Keystore decoded successfully"
59+
# Decode keystore from base64 (secret is accessed directly, never echoed)
60+
echo '${{ secrets.ANDROID_KEYSTORE_BASE64 }}' | tr -d '\n\r\t ' | base64 --decode > android/app/release.keystore
61+
if [ -f android/app/release.keystore ]; then
62+
echo "✓ Keystore decoded successfully"
63+
else
64+
echo "✗ Failed to decode keystore"
65+
exit 1
66+
fi
6367
6468
- name: Create local.properties
6569
run: |
Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,37 @@
22

33
This document outlines the process for building and preparing Android App Bundles (AAB) for Google Play Console distribution.
44

5-
## Prerequisites
5+
## Recommended: GitHub Actions (CI/CD)
6+
7+
**The preferred method is to build via GitHub Actions**, which handles all setup automatically and produces a downloadable AAB artifact.
8+
9+
### Steps:
10+
11+
1. Ensure version numbers are updated (see [RELEASE.md](./RELEASE.md))
12+
2. Go to **GitHub****Actions****"Android Release"**
13+
3. Click **"Run workflow"**
14+
4. Wait for the build to complete (~10-15 minutes)
15+
5. Download the AAB from **Artifacts** section at the bottom of the workflow run page
16+
6. Upload to Google Play Console manually
17+
18+
### Required GitHub Secrets
19+
20+
The following secrets must be configured in your repository (Settings → Secrets and variables → Actions):
21+
22+
- `ANDROID_KEYSTORE_BASE64` - Your release keystore file (base64 encoded)
23+
- `ANDROID_KEYSTORE_PASSWORD` - Keystore password
24+
- `ANDROID_KEY_ALIAS` - Key alias
25+
- `ANDROID_KEY_PASSWORD` - Key password
26+
- `EXPO_PUBLIC_DETOUR_API_KEY` - Detour SDK API key
27+
- `EXPO_PUBLIC_DETOUR_APP_ID` - Detour SDK App ID
28+
29+
---
30+
31+
## Alternative: Local Build
32+
33+
If you need to build locally instead of using GitHub Actions, follow these instructions.
34+
35+
### Prerequisites
636

737
### 1. Development Environment
838

docs/RELEASE.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Release Guide
2+
3+
This guide covers the process for releasing new versions of Private Mind to the App Store and Google Play Store.
4+
5+
## Version Bumping
6+
7+
Before creating a release, update the version number in the following locations:
8+
9+
### 1. App Version (Required)
10+
11+
**File:** [app.json](../app.json)
12+
13+
Update the `version` field:
14+
15+
```json
16+
{
17+
"expo": {
18+
"version": "1.1.4"
19+
}
20+
}
21+
```
22+
23+
### 2. Android Version Code (Required)
24+
25+
**File:** [android/app/build.gradle](../android/app/build.gradle)
26+
27+
Update both `versionCode` (increment by 1) and `versionName` (match app.json):
28+
29+
```gradle
30+
defaultConfig {
31+
versionCode 60 // Increment this
32+
versionName "1.1.4" // Match app.json version
33+
}
34+
```
35+
36+
### 3. iOS Build Number (Required)
37+
38+
The build number should be set in `info` and `general` sections in Xcode, ensure the version matches `app.json`.
39+
40+
## Platform-Specific Release Instructions
41+
42+
### Android Release
43+
44+
Android builds are automated via GitHub Actions. See [ANDROID_RELEASE.md](../ANDROID_RELEASE.md) for detailed instructions.
45+
46+
**Quick Steps:**
47+
48+
1. Update version numbers (see above)
49+
2. Commit and push changes
50+
3. Go to GitHub Actions "Android Release"
51+
4. Run workflow manually
52+
5. Download the generated `.aab` file from workflow artifacts
53+
6. Upload to Google Play Console manually
54+
55+
### iOS Release
56+
57+
iOS builds are created locally using Xcode.
58+
59+
**Steps:**
60+
61+
1. Update version numbers (see above)
62+
2. Open `ios/PrivateMind.xcworkspace` in Xcode
63+
3. Select "Any iOS Device" as the build target
64+
4. Choose **Product** -> **Archive**
65+
5. Once archiving completes, the Organizer window will open
66+
6. Click **Distribute App**
67+
7. Select **App Store Connect** -> **Upload**
68+
8. Follow the prompts to upload to TestFlight/App Store
69+
70+
For detailed iOS publishing instructions, refer to the [React Native Publishing to App Store guide](https://reactnative.dev/docs/publishing-to-app-store).

0 commit comments

Comments
 (0)