-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54034 from software-mansion-labs/update-hybrid-ad…
…hoc-builds-after-repo-structure-change [No QA] Update hybrid app adhoc builds after repo structure chagne
- Loading branch information
Showing
2 changed files
with
38 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,6 @@ on: | |
OLD_DOT_COMMIT: | ||
description: The branch, tag or SHA to checkout on Old Dot side | ||
required: false | ||
default: 'main' | ||
pull_request_target: | ||
types: [opened, synchronize, labeled] | ||
branches: ['*ci-test/**'] | ||
|
@@ -88,52 +87,46 @@ jobs: | |
needs: [validateActor, getBranchRef] | ||
if: ${{ fromJSON(needs.validateActor.outputs.READY_TO_BUILD) }} | ||
runs-on: ubuntu-latest-xl | ||
defaults: | ||
run: | ||
working-directory: Mobile-Expensify/react-native | ||
outputs: | ||
S3_APK_PATH: ${{ steps.exportAndroidS3Path.outputs.S3_APK_PATH }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: 'Expensify/Mobile-Expensify' | ||
submodules: true | ||
path: 'Mobile-Expensify' | ||
ref: ${{ env.OLD_DOT_COMMIT }} | ||
ref: ${{ github.event.pull_request.head.sha || needs.getBranchRef.outputs.REF }} | ||
token: ${{ secrets.OS_BOTIFY_TOKEN }} | ||
# fetch-depth: 0 is required in order to fetch the correct submodule branch | ||
fetch-depth: 0 | ||
|
||
- name: Update submodule | ||
- name: Update submodule to match main | ||
env: | ||
OLD_DOT_COMMIT: ${{ env.OLD_DOT_COMMIT }} | ||
run: | | ||
git submodule update --init | ||
git fetch | ||
git checkout ${{ github.event.pull_request.head.sha || needs.getBranchRef.outputs.REF }} | ||
git submodule update --init --remote | ||
if [[ -z "$OLD_DOT_COMMIT" ]]; then | ||
git fetch | ||
git checkout ${{ env.OLD_DOT_COMMIT }} | ||
fi | ||
- 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: Setup Node | ||
id: setup-node | ||
uses: ./.github/actions/composite/setupNode | ||
|
||
- name: Run grunt build | ||
run: | | ||
cd Mobile-Expensify | ||
npm run grunt:build:shared | ||
- name: Setup dotenv | ||
run: | | ||
cp .env.staging .env.adhoc | ||
sed -i 's/ENVIRONMENT=staging/ENVIRONMENT=adhoc/' .env.adhoc | ||
echo "PULL_REQUEST_NUMBER=${{ inputs.pull_request_number }}" >> .env.adhoc | ||
- 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 Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
|
@@ -144,7 +137,6 @@ jobs: | |
uses: ruby/[email protected] | ||
with: | ||
bundler-cache: true | ||
working-directory: 'Mobile-Expensify/react-native' | ||
|
||
- name: Install 1Password CLI | ||
uses: 1password/install-cli-action@v1 | ||
|
@@ -156,7 +148,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 | ||
|
@@ -205,53 +197,43 @@ jobs: | |
env: | ||
DEVELOPER_DIR: /Applications/Xcode_15.2.0.app/Contents/Developer | ||
runs-on: macos-13-xlarge | ||
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' | ||
ref: ${{ env.OLD_DOT_COMMIT }} | ||
ref: ${{ github.event.pull_request.head.sha || needs.getBranchRef.outputs.REF }} | ||
token: ${{ secrets.OS_BOTIFY_TOKEN }} | ||
# fetch-depth: 0 is required in order to fetch the correct submodule branch | ||
fetch-depth: 0 | ||
|
||
- name: Update submodule | ||
- name: Update submodule to match main | ||
env: | ||
OLD_DOT_COMMIT: ${{ env.OLD_DOT_COMMIT }} | ||
run: | | ||
git submodule update --init | ||
git fetch | ||
git checkout ${{ github.event.pull_request.head.sha || needs.getBranchRef.outputs.REF }} | ||
git submodule update --init --remote | ||
if [[ -z "$OLD_DOT_COMMIT" ]]; then | ||
git fetch | ||
git checkout ${{ env.OLD_DOT_COMMIT }} | ||
fi | ||
- name: Configure MapBox SDK | ||
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: npm | ||
cache-dependency-path: 'Mobile-Expensify/react-native' | ||
|
||
uses: ./.github/actions/composite/setupNode | ||
|
||
- name: Create .env.adhoc file based on staging and add PULL_REQUEST_NUMBER env to it | ||
run: | | ||
cp .env.staging .env.adhoc | ||
sed -i '' 's/ENVIRONMENT=staging/ENVIRONMENT=adhoc/' .env.adhoc | ||
echo "PULL_REQUEST_NUMBER=$PULL_REQUEST_NUMBER" >> .env.adhoc | ||
- name: Install node modules | ||
run: | | ||
npm install | ||
cd .. && npm install | ||
- 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 | ||
|
@@ -260,20 +242,20 @@ jobs: | |
uses: actions/cache@v4 | ||
id: pods-cache | ||
with: | ||
path: ios/Pods | ||
key: ${{ runner.os }}-pods-cache-${{ hashFiles('ios/Podfile.lock', 'firebase.json') }} | ||
path: Mobile-Expensify/iOS/Pods | ||
key: ${{ runner.os }}-pods-cache-${{ hashFiles('Mobile-Expensify/iOS/Podfile.lock', 'firebase.json') }} | ||
|
||
- name: Compare Podfile.lock and Manifest.lock | ||
id: compare-podfile-and-manifest | ||
run: echo "IS_PODFILE_SAME_AS_MANIFEST=${{ hashFiles('ios/Podfile.lock') == hashFiles('ios/Pods/Manifest.lock') }}" >> "$GITHUB_OUTPUT" | ||
run: echo "IS_PODFILE_SAME_AS_MANIFEST=${{ hashFiles('Mobile-Expensify/iOS/Podfile.lock') == hashFiles('Mobile-Expensify/iOS/Manifest.lock') }}" >> "$GITHUB_OUTPUT" | ||
|
||
- name: Install cocoapods | ||
uses: nick-fields/retry@3f757583fb1b1f940bc8ef4bf4734c8dc02a5847 | ||
if: steps.pods-cache.outputs.cache-hit != 'true' || steps.compare-podfile-and-manifest.outputs.IS_PODFILE_SAME_AS_MANIFEST != 'true' || steps.setup-node.outputs.cache-hit != 'true' | ||
with: | ||
timeout_minutes: 10 | ||
max_attempts: 5 | ||
command: cd Mobile-Expensify/iOS && bundle exec pod install | ||
command: npm run pod-install | ||
|
||
- name: Install 1Password CLI | ||
uses: 1password/install-cli-action@v1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters