Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
92190bf
Add Google Sign-In login screen
digitalnomad91 Jun 30, 2025
c36cbe9
Updated workflow to run on any branch & to create pre-release builds …
digitalnomad91 Jun 30, 2025
db98904
Added types to color props.
digitalnomad91 Jun 30, 2025
2d56de7
Instantiated globalErrorHandler.
digitalnomad91 Jun 30, 2025
059f67e
Created global build script & new setupErrorExceptionHandler script.
digitalnomad91 Jun 30, 2025
f2df8f7
global error handler file.
digitalnomad91 Jun 30, 2025
f9a86f2
Installed react-native-exception-handler & updated scripts to use glo…
digitalnomad91 Jun 30, 2025
2997243
Fixed error on line 185.
digitalnomad91 Jun 30, 2025
00d7566
Prerelease / nightly /staging build workflow updates.
digitalnomad91 Jun 30, 2025
c9ced0b
Merge remote-tracking branch 'origin/codex/integrate-new-login-screen…
digitalnomad91 Jul 4, 2025
eacbb14
xcode / ios additions + other cleanup & optimizations.
digitalnomad91 Aug 18, 2025
0da65b4
Added oauth web client id.
digitalnomad91 Aug 18, 2025
2872fc6
Added oauth config props.
digitalnomad91 Aug 18, 2025
c93bee6
Created notifier service to handle 'internal' app notifications.
digitalnomad91 Aug 18, 2025
ea15595
Added global error handler + other important stuffs.
digitalnomad91 Aug 18, 2025
1a97386
Updated tabs menu.
digitalnomad91 Aug 18, 2025
89dba29
Added battery info button, login button, and other testing stuff to m…
digitalnomad91 Aug 18, 2025
7205788
Added external API google oauth login stuff.
digitalnomad91 Aug 18, 2025
2ef9685
Updated LogViewer component to be able to handle messages from new lo…
digitalnomad91 Aug 18, 2025
40508e8
Fixed tsx stuff that shouldn't have been in .ts hook file.
digitalnomad91 Aug 18, 2025
75051c7
Refactoring push notification hooks.
digitalnomad91 Aug 18, 2025
faa8fd3
Prettify file.
digitalnomad91 Aug 18, 2025
646fe79
Fixing broken api url for background task.
digitalnomad91 Aug 18, 2025
ef3b784
Added .env.example template.
digitalnomad91 Aug 18, 2025
eff7e6a
Added pnpm workspace file.
digitalnomad91 Aug 18, 2025
4ddc123
Added providers folder & created AuthProvider + NotificationProvider.
digitalnomad91 Aug 18, 2025
8a3ed92
Potential fix for code scanning alert no. 10: Shell command built fro…
digitalnomad91 Aug 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copy this file to `.env` and fill in your values
# These are consumed by app.config.js via dotenv at build time

# Firebase config (also present in google-services.json / GoogleService-Info.plist for native)
FIREBASE_API_KEY=
FIREBASE_AUTH_DOMAIN=
FIREBASE_PROJECT_ID=
FIREBASE_STORAGE_BUCKET=
FIREBASE_MESSAGING_SENDER_ID=
FIREBASE_APP_ID=

# Google Sign-In: REQUIRED for offline access and proper sign-in on native
# Provide the OAuth 2.0 Client ID of type "Web application" from Google Cloud console (same project as your iOS/Android clients)
GOOGLE_WEB_CLIENT_ID=

# Optional: Maps (Android)
GOOGLE_MAPS_API_KEY=

# Build metadata
BUILD_DATE=
40 changes: 33 additions & 7 deletions .github/workflows/eas-android-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ permissions:

on:
push:
branches: [main]
branches: ["**"] # Run on all branches
workflow_dispatch:

env:
Expand All @@ -21,6 +21,7 @@ jobs:
build_number: ${{ steps.version-control.outputs.build_number }}
build_date: ${{ steps.version-control.outputs.build_date }}
is_production: ${{ steps.version-control.outputs.is_production }}
branch_name: ${{ steps.extract-branch.outputs.branch_name }}
steps:
# ========================
# 🛠️ Repository Setup
Expand All @@ -30,6 +31,14 @@ jobs:
with:
fetch-depth: 0

- name: "🔍 Extract branch name"
id: extract-branch
shell: bash
run: |
BRANCH_NAME=${GITHUB_REF#refs/heads/}
echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT
echo "Branch: $BRANCH_NAME"

# ========================
# ⚙️ Environment Configuration
# ========================
Expand Down Expand Up @@ -73,7 +82,12 @@ jobs:
APP_VERSION=$(jq -r '.version' version.json)
IS_PRODUCTION="true"
else
APP_VERSION="1.0.0-prerelease.${{ github.run_number }}"
# For non-main branches, create a prerelease version with branch name
BRANCH_NAME=${{ steps.extract-branch.outputs.branch_name }}
SANITIZED_BRANCH=$(echo "$BRANCH_NAME" | sed 's/[^a-zA-Z0-9]/-/g')
# Get base version from version.json
BASE_VERSION=$(jq -r '.version' version.json)
APP_VERSION="${BASE_VERSION}-pre.${SANITIZED_BRANCH}.${{ github.run_number }}"
IS_PRODUCTION="false"
fi

Expand Down Expand Up @@ -109,7 +123,17 @@ jobs:
run: |
echo "🔄 Initializing build process..."
sudo apt-get install -y jq
BUILD_JSON=$(npx eas build -p android --profile production --non-interactive --json)

# Choose profile based on branch
if [ "${{ github.ref }}" == "refs/heads/main" ]; then
BUILD_PROFILE="production"
else
BUILD_PROFILE="preview" # Use a different profile for pre-releases if needed
fi

echo "Using build profile: $BUILD_PROFILE"

BUILD_JSON=$(npx eas build -p android --profile $BUILD_PROFILE --non-interactive --json)
echo "Raw build output: $BUILD_JSON"
BUILD_ID=$(echo "$BUILD_JSON" | jq -r '.[0].id')
if [[ -z "$BUILD_ID" || "$BUILD_ID" == "null" ]]; then
Expand Down Expand Up @@ -274,7 +298,6 @@ jobs:
CHANGELOG=$(git log --pretty=format:"- %s (%h) by %an" -n 15)
echo "$CHANGELOG" > changelog.txt

# FIXED OUTPUT HANDLING (ONLY CHANGE)
delimiter=$(openssl rand -hex 6)
echo "CHANGELOG<<${delimiter}" >> $GITHUB_OUTPUT
cat changelog.txt >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -316,11 +339,14 @@ jobs:
RELEASE_TAG="v${{ needs.build-android.outputs.app_version }}"
RELEASE_TITLE="Production Release v${{ needs.build-android.outputs.app_version }}"
else
echo "🟡 Nightly build detected"
RELEASE_TAG="nightly-${{ needs.build-android.outputs.build_date }}"
RELEASE_TITLE="Nightly Build (${{ needs.build-android.outputs.build_date }})"
echo "🟡 Pre-release build detected"
BRANCH_NAME="${{ needs.build-android.outputs.branch_name }}"
RELEASE_TAG="prerelease-${BRANCH_NAME}-${{ needs.build-android.outputs.build_date }}"
RELEASE_TITLE="Pre-release (${BRANCH_NAME}) v${{ needs.build-android.outputs.app_version }}"
fi
echo "RELEASE_TAG=${RELEASE_TAG}" >> $GITHUB_OUTPUT
echo "RELEASE_TITLE=${RELEASE_TITLE}" >> $GITHUB_OUTPUT

- name: "🎉 Publish GitHub Release"
uses: softprops/action-gh-release@v2
with:
Expand Down
4 changes: 4 additions & 0 deletions GoogleService-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
<true></true>
<key>IS_SIGNIN_ENABLED</key>
<true></true>
<key>CLIENT_ID</key>
<string>906784991953-aoq1tgiac6ge9aqv4kguai26265393h9.apps.googleusercontent.com</string>
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.906784991953-aoq1tgiac6ge9aqv4kguai26265393h9</string>
<key>GOOGLE_APP_ID</key>
<string>1:982053776531:ios:eec4ee1692d95d2ce3b166</string>
</dict>
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ CodeBuilder Admin is a mobile application built with React Native and Expo. This

```env
GOOGLE_MAPS_API_KEY=your_google_maps_api_key
GOOGLE_WEB_CLIENT_ID=your_google_web_client_id
FIREBASE_API_KEY=your_firebase_api_key
FIREBASE_AUTH_DOMAIN=your_firebase_auth_domain
FIREBASE_PROJECT_ID=your_firebase_project_id
Expand Down
Loading