Skip to content

Commit

Permalink
Merge pull request #141 from software-mansion-labs/feat/hybridapp-dep…
Browse files Browse the repository at this point in the history
…loy-adjustments

Adjust HybridApp deployment to the added submodule
  • Loading branch information
staszekscp authored Nov 21, 2024
2 parents a17f39c + 8244b48 commit 56b8924
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 45 deletions.
43 changes: 7 additions & 36 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,18 +167,13 @@ jobs:
name: Build and deploy Android HybridApp
needs: prep
runs-on: ubuntu-latest-xl
defaults:
run:
working-directory: Mobile-Expensify/react-native
env:
RUBYOPT: '-rostruct'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: 'Expensify/Mobile-Expensify'
submodules: true
path: 'Mobile-Expensify'
token: ${{ secrets.OS_BOTIFY_TOKEN }}
# fetch-depth: 0 is required in order to fetch the correct submodule branch
fetch-depth: 0
Expand All @@ -193,19 +188,9 @@ jobs:
- name: Configure MapBox SDK
run: ./scripts/setup-mapbox-sdk.sh ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- uses: actions/setup-node@v4
with:
node-version-file: 'Mobile-Expensify/react-native/.nvmrc'
cache: npm
cache-dependency-path: 'Mobile-Expensify/react-native'

- name: Install node modules
run: |
npm install
cd .. && npm install
# Fixes https://github.com/Expensify/App/issues/51682
npm run grunt:build:shared
- name: Setup Node
id: setup-node
uses: ./.github/actions/composite/setupNode

- name: Setup Java
uses: actions/setup-java@v4
Expand All @@ -217,7 +202,6 @@ jobs:
uses: ruby/[email protected]
with:
bundler-cache: true
working-directory: 'Mobile-Expensify/react-native'

- name: Install New Expensify Gems
run: bundle install
Expand All @@ -232,7 +216,7 @@ jobs:
op document get --output ./upload-key.keystore upload-key.keystore
op document get --output ./android-fastlane-json-key.json android-fastlane-json-key.json
# Copy the keystore to the Android directory for Fullstory
cp ./upload-key.keystore ../Android
cp ./upload-key.keystore Mobile-Expensify/Android
- name: Load Android upload keystore credentials from 1Password
id: load-credentials
Expand Down Expand Up @@ -487,16 +471,11 @@ jobs:
runs-on: macos-13-xlarge
env:
DEVELOPER_DIR: /Applications/Xcode_15.2.0.app/Contents/Developer
defaults:
run:
working-directory: Mobile-Expensify/react-native
steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: 'Expensify/Mobile-Expensify'
submodules: true
path: 'Mobile-Expensify'
token: ${{ secrets.OS_BOTIFY_TOKEN }}
# fetch-depth: 0 is required in order to fetch the correct submodule branch
fetch-depth: 0
Expand All @@ -512,22 +491,14 @@ jobs:
run: |
./scripts/setup-mapbox-sdk.sh ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}
- uses: actions/setup-node@v4
- name: Setup Node
id: setup-node
with:
node-version-file: 'Mobile-Expensify/react-native/.nvmrc'
cache-dependency-path: 'Mobile-Expensify/react-native'

- name: Install node modules
run: |
npm install
cd .. && npm install
uses: ./.github/actions/composite/setupNode

- name: Setup Ruby
uses: ruby/[email protected]
with:
bundler-cache: true
working-directory: 'Mobile-Expensify/react-native'

- name: Install New Expensify Gems
run: bundle install
Expand All @@ -549,7 +520,7 @@ jobs:
with:
timeout_minutes: 10
max_attempts: 5
command: cd Mobile-Expensify/iOS && pod install
command: npm run pod-install

- name: Install 1Password CLI
uses: 1password/install-cli-action@v1
Expand Down
2 changes: 1 addition & 1 deletion Mobile-Expensify
16 changes: 8 additions & 8 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ platform :android do

desc "Generate a production HybridApp AAB"
lane :build_hybrid do
ENV["ENVFILE"]="../.env.production.hybridapp"
ENV["ENVFILE"]="Mobile-Expensify/.env.production.hybridapp"
gradle(
project_dir: '../Android',
project_dir: 'Mobile-Expensify/Android',
task: "bundleRelease",
flags: "--refresh-dependencies",
properties: {
Expand Down Expand Up @@ -102,7 +102,7 @@ platform :android do
lane :build_local_hybrid do
ENV["ENVFILE"]=".env.production"
gradle(
project_dir: '../Android',
project_dir: 'Mobile-Expensify/Android',
task: 'assemble',
flavor: 'Production',
build_type: 'Release',
Expand Down Expand Up @@ -353,7 +353,7 @@ platform :ios do

desc "Build an iOS HybridApp production build"
lane :build_hybrid do
ENV["ENVFILE"]="../.env.production.hybridapp"
ENV["ENVFILE"]="Mobile-Expensify/.env.production.hybridapp"

setupIOSSigningCertificate()

Expand All @@ -366,7 +366,7 @@ platform :ios do
)

build_app(
workspace: "../iOS/Expensify.xcworkspace",
workspace: "Mobile-Expensify/iOS/Expensify.xcworkspace",
scheme: "Expensify",
output_name: "Expensify.ipa",
export_method: "app-store",
Expand Down Expand Up @@ -394,9 +394,9 @@ platform :ios do

desc "Build an unsigned iOS HybridApp production build"
lane :build_unsigned_hybrid do
ENV["ENVFILE"]="../Mobile-Expensify/.env.production.hybridapp"
ENV["ENVFILE"]="./Mobile-Expensify/.env.production.hybridapp"
build_app(
workspace: "../Mobile-Expensify/iOS/Expensify.xcworkspace",
workspace: "./Mobile-Expensify/iOS/Expensify.xcworkspace",
scheme: "Expensify"
)
setIOSBuildOutputsInEnv()
Expand Down Expand Up @@ -513,7 +513,7 @@ platform :ios do
dsym_path: ENV[KEY_DSYM_PATH],
gsp_path: "./ios/GoogleService-Info.plist",
# Assuming we are running this from the react-native submodule directory for HybridApp
binary_path: "../iOS/Pods/FirebaseCrashlytics/upload-symbols"
binary_path: "./Mobile-Expensify/iOS/Pods/FirebaseCrashlytics/upload-symbols"
)
end

Expand Down

0 comments on commit 56b8924

Please sign in to comment.