Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding project structure #12

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
24 changes: 6 additions & 18 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ jobs:
restore-keys: |
${{ runner.os }}-gems-

- name: Install Fastlane 🏎️
run: gem install fastlane
- name: Install Dependencies via Bundler 📦
run: bundle install

ios_beta_deploy:
name: "Deployment: Deploying iOS Beta 🖥️✈️"
Expand All @@ -39,13 +39,7 @@ jobs:
- name: Checkout Code 🛒
uses: actions/checkout@v2

# Repeat the setup steps, including restoring the cache
- name: Set up Ruby 💎
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'

- name: Restore Cache
- name: Restore Ruby Cache 💎
uses: actions/cache@v2
with:
path: vendor/bundle
Expand All @@ -54,7 +48,7 @@ jobs:
${{ runner.os }}-gems-

- name: iOS Beta Deployment 🖥️✈️
run: fastlane ios beta
run: bundle exec fastlane ios beta
env:
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
Expand All @@ -67,13 +61,7 @@ jobs:
- name: Checkout Code 🛒
uses: actions/checkout@v2

# Repeat the setup steps, including restoring the cache
- name: Set up Ruby 💎
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'

- name: Restore Cache
- name: Restore Ruby Cache 💎
uses: actions/cache@v2
with:
path: vendor/bundle
Expand All @@ -82,7 +70,7 @@ jobs:
${{ runner.os }}-gems-

- name: Android Beta Deployment 🤖✈️
run: fastlane android beta
run: bundle exec fastlane android beta
env:
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
JSON_KEY_DATA: ${{ secrets.JSON_KEY_DATA }}
40 changes: 24 additions & 16 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,16 @@ jobs:
with:
ruby-version: '2.7'

- name: Install Fastlane 🏎️
run: gem install fastlane
- name: Cache Ruby Gems
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-

- name: Install Dependencies via Bundler 📦
run: bundle install

ios_production:
name: "Deployment: Deploying iOS Production Release 🖥️🚀"
Expand All @@ -31,16 +39,16 @@ jobs:
- name: Checkout Code 🛒
uses: actions/checkout@v2

- name: Set up Ruby 💎
uses: ruby/setup-ruby@v1
- name: Restore Ruby Cache 💎
uses: actions/cache@v2
with:
ruby-version: '2.7'

- name: Install Fastlane 🏎️
run: gem install fastlane
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-

- name: iOS Production Deployment 🖥️🚀
run: fastlane ios release
run: bundle exec fastlane ios release
env:
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
Expand All @@ -53,16 +61,16 @@ jobs:
- name: Checkout Code 🛒
uses: actions/checkout@v2

- name: Set up Ruby 💎
uses: ruby/setup-ruby@v1
- name: Restore Ruby Cache 💎
uses: actions/cache@v2
with:
ruby-version: '2.7'

- name: Install Fastlane 🏎️
run: gem install fastlane
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-

- name: Android Production Deployment 🤖🚀
run: fastlane android release
run: bundle exec fastlane android release
env:
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
JSON_KEY_DATA: ${{ secrets.JSON_KEY_DATA }}
53 changes: 53 additions & 0 deletions android.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#!/bin/bash

# Name of the Emulator
DEFAULT_EMULATOR_NAME="Pixel_7_Pro_API_33_1"

# Path to your Android SDK tools
ANDROID_SDK_PATH="$HOME/Library/Android/sdk"

# Path to your React Native project
PROJECT_PATH=""

# List available Android simulators
echo "Available Emulators:"
$ANDROID_SDK_PATH/emulator/emulator -list-avds

# Ask the user to choose an Emulator
read -p "Please choose an emulator (default = $DEFAULT_EMULATOR_NAME): " EMULATOR_NAME

# If no emulator is entered, use the default
if [ -z "$EMULATOR_NAME" ]; then
EMULATOR_NAME="$DEFAULT_EMULATOR_NAME"
fi

echo "Using emulator: $EMULATOR_NAME"

# Start the Emulator
$ANDROID_SDK_PATH/emulator/emulator -avd $EMULATOR_NAME &

# Wait for the emulator to finish booting
$ANDROID_SDK_PATH/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;'

# Navigate to your project directory
#cd $PROJECT_PATH

# Default port
PORT=8081

# Check if port 8081 is in use, and if so, use port 8082
if lsof -Pi :8081 -sTCP:LISTEN -t >/dev/null ; then
PORT=8082
fi

echo "Starting the React Native development server on port $PORT"

# Start the React Native development server on the selected port
npx react-native start --port $PORT &

# Wait for a few seconds to ensure that the development server has started
sleep 5

# Run your React Native app
REACT_NATIVE_PACKAGER_HOSTNAME="127.0.0.1:$PORT"
npx react-native run-android
45 changes: 45 additions & 0 deletions ios.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/bash

# Default port
PORT=8081

# Check if port 8081 is in use, and if so, use port 8082
if lsof -Pi :8081 -sTCP:LISTEN -t >/dev/null ; then
PORT=8082
fi

echo "Using port $PORT"

# List available devices
echo "Available devices:"
xcrun simctl list devices

DEFAULT_SIMULATOR_NAME="iPhone 15 Pro Max"

# Ask the user to enter the device they want to use
read -p "Enter the device you want to use (default: $DEFAULT_SIMULATOR_NAME): " SIMULATOR_NAME

# If the user didn't enter anything, use the default simulator name
if [ -z "$SIMULATOR_NAME" ]; then
SIMULATOR_NAME="$DEFAULT_SIMULATOR_NAME"
fi

echo "Using simulator: $SIMULATOR_NAME"

# Open the iOS simulator
xcrun simctl boot "$SIMULATOR_NAME" || echo "Failed to launch simulator"

# Wait for a few seconds to ensure that the simulator has started
sleep 5

# Navigate to your project directory
#cd $PROJECT_PATH

# Start the React Native development server on the specified port
npx react-native start --port $PORT &

# Wait for a few seconds to ensure that the development server has started
sleep 5

# Run your React Native app on the simulator, specifying the port
REACT_NATIVE_PACKAGER_HOSTNAME="127.0.0.1:$PORT" npx react-native run-ios --simulator="$SIMULATOR_NAME"
59 changes: 59 additions & 0 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,8 @@ PODS:
- React-jsinspector (0.72.6)
- React-logger (0.72.6):
- glog
- react-native-safe-area-context (4.7.4):
- React-Core
- React-NativeModulesApple (0.72.6):
- hermes-engine
- React-callinvoker
Expand Down Expand Up @@ -485,6 +487,43 @@ PODS:
- React-jsi (= 0.72.6)
- React-logger (= 0.72.6)
- React-perflogger (= 0.72.6)
- RNCMaskedView (0.1.11):
- React
- RNGestureHandler (2.13.4):
- RCT-Folly (= 2021.07.22.00)
- React-Core
- RNReanimated (3.5.4):
- DoubleConversion
- FBLazyVector
- glog
- hermes-engine
- RCT-Folly
- RCTRequired
- RCTTypeSafety
- React-callinvoker
- React-Core
- React-Core/DevSupport
- React-Core/RCTWebSocket
- React-CoreModules
- React-cxxreact
- React-hermes
- React-jsi
- React-jsiexecutor
- React-jsinspector
- React-RCTActionSheet
- React-RCTAnimation
- React-RCTAppDelegate
- React-RCTBlob
- React-RCTImage
- React-RCTLinking
- React-RCTNetwork
- React-RCTSettings
- React-RCTText
- ReactCommon/turbomodule/core
- Yoga
- RNScreens (3.27.0):
- RCT-Folly (= 2021.07.22.00)
- React-Core
- RNSVG (13.14.0):
- React-Core
- SocketRocket (0.6.1)
Expand Down Expand Up @@ -538,6 +577,7 @@ DEPENDENCIES:
- React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`)
- React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
- React-logger (from `../node_modules/react-native/ReactCommon/logger`)
- react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
- React-NativeModulesApple (from `../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`)
- React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`)
- React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
Expand All @@ -555,6 +595,10 @@ DEPENDENCIES:
- React-runtimescheduler (from `../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler`)
- React-utils (from `../node_modules/react-native/ReactCommon/react/utils`)
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
- "RNCMaskedView (from `../node_modules/@react-native-community/masked-view`)"
- RNGestureHandler (from `../node_modules/react-native-gesture-handler`)
- RNReanimated (from `../node_modules/react-native-reanimated`)
- RNScreens (from `../node_modules/react-native-screens`)
- RNSVG (from `../node_modules/react-native-svg`)
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)

Expand Down Expand Up @@ -619,6 +663,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon/jsinspector"
React-logger:
:path: "../node_modules/react-native/ReactCommon/logger"
react-native-safe-area-context:
:path: "../node_modules/react-native-safe-area-context"
React-NativeModulesApple:
:path: "../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios"
React-perflogger:
Expand Down Expand Up @@ -653,6 +699,14 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon/react/utils"
ReactCommon:
:path: "../node_modules/react-native/ReactCommon"
RNCMaskedView:
:path: "../node_modules/@react-native-community/masked-view"
RNGestureHandler:
:path: "../node_modules/react-native-gesture-handler"
RNReanimated:
:path: "../node_modules/react-native-reanimated"
RNScreens:
:path: "../node_modules/react-native-screens"
RNSVG:
:path: "../node_modules/react-native-svg"
Yoga:
Expand Down Expand Up @@ -692,6 +746,7 @@ SPEC CHECKSUMS:
React-jsiexecutor: 3bf18ff7cb03cd8dfdce08fbbc0d15058c1d71ae
React-jsinspector: 194e32c6aab382d88713ad3dd0025c5f5c4ee072
React-logger: cebf22b6cf43434e471dc561e5911b40ac01d289
react-native-safe-area-context: 2cd91d532de12acdb0a9cbc8d43ac72a8e4c897c
React-NativeModulesApple: 02e35e9a51e10c6422f04f5e4076a7c02243fff2
React-perflogger: e3596db7e753f51766bceadc061936ef1472edc3
React-RCTActionSheet: 17ab132c748b4471012abbcdcf5befe860660485
Expand All @@ -709,6 +764,10 @@ SPEC CHECKSUMS:
React-runtimescheduler: f23e337008403341177fc52ee4ca94e442c17ede
React-utils: fa59c9a3375fb6f4aeb66714fd3f7f76b43a9f16
ReactCommon: dd03c17275c200496f346af93a7b94c53f3093a4
RNCMaskedView: 0e1bc4bfa8365eba5fbbb71e07fbdc0555249489
RNGestureHandler: 6e46dde1f87e5f018a54fe5d40cd0e0b942b49ee
RNReanimated: ab2e96c6d5591c3dfbb38a464f54c8d17fb34a87
RNScreens: 3c2d122f5e08c192e254c510b212306da97d2581
RNSVG: d00c8f91c3cbf6d476451313a18f04d220d4f396
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
Yoga: b76f1acfda8212aa16b7e26bcce3983230c82603
Expand Down
Empty file.
Empty file added metadata/en-US/title.txt
Empty file.
Loading
Loading