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

[No QA]Build HybridApp in open source when we deploy to staging #50014

Merged
merged 76 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from 74 commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
0ff9671
Start to build fastlane pipeline
AndrewGable Sep 26, 2024
a149a88
Add build_hybrid lane
AndrewGable Sep 26, 2024
18f4eb0
Merge branch 'main' into andrew-mobile-deploy
AndrewGable Oct 1, 2024
0dfef03
Add Android and HybridApp builds in worflow
AndrewGable Oct 1, 2024
5bbfbf1
Test hybrid builds
AndrewGable Oct 1, 2024
8661b15
More testing
AndrewGable Oct 1, 2024
222f8c9
Update Android build steps
AndrewGable Oct 1, 2024
de4eb5f
Update validate actor
AndrewGable Oct 1, 2024
548cd58
Update branch ref
AndrewGable Oct 1, 2024
b853a4a
Try submodule update init
AndrewGable Oct 1, 2024
af22bfb
Debugging
AndrewGable Oct 1, 2024
770c465
Update paths
AndrewGable Oct 1, 2024
6245969
Try fetch-depth
AndrewGable Oct 1, 2024
1a1466c
Debugging paths
AndrewGable Oct 1, 2024
90d3823
Default path
AndrewGable Oct 1, 2024
669710d
Update path
AndrewGable Oct 1, 2024
a014a37
Remove setup node
AndrewGable Oct 1, 2024
2d0c639
Fixing more bugs
AndrewGable Oct 1, 2024
83bc45d
Fixing more bugs
AndrewGable Oct 1, 2024
909be80
Install cli
AndrewGable Oct 1, 2024
f2f768e
Remove pod install script
AndrewGable Oct 1, 2024
5ded58f
More debug
AndrewGable Oct 1, 2024
71acf27
Get more files from 1P
AndrewGable Oct 1, 2024
8d781dc
Switch order
AndrewGable Oct 1, 2024
7e3532f
Tweak syntax
AndrewGable Oct 1, 2024
b1997e2
Merge branch 'main' into andrew-mobile-deploy
AndrewGable Oct 2, 2024
0285202
Update name of iOS certs
AndrewGable Oct 2, 2024
42e5ef9
Fix android credentials
AndrewGable Oct 2, 2024
6feacd6
Update env variables
AndrewGable Oct 2, 2024
e4c4aa3
More debugging
AndrewGable Oct 2, 2024
eb7ea6d
More debugging
AndrewGable Oct 2, 2024
43e0406
Tweaking build configs
AndrewGable Oct 2, 2024
f194227
Moving things around
AndrewGable Oct 2, 2024
9dacedd
Moving paths around
AndrewGable Oct 2, 2024
03f5b65
Change path
AndrewGable Oct 2, 2024
2831809
Rename the folder
AndrewGable Oct 2, 2024
b813d5c
Add tmate
AndrewGable Oct 2, 2024
b380c99
Update move path
AndrewGable Oct 2, 2024
6c49517
Update default path
AndrewGable Oct 2, 2024
0e865f4
Try to rename on iOS
AndrewGable Oct 2, 2024
28f4c77
Update working directory
AndrewGable Oct 2, 2024
d6484e3
Fix nvm
AndrewGable Oct 2, 2024
2370198
Update cache path
AndrewGable Oct 2, 2024
f13afde
Add working directory for ruby
AndrewGable Oct 2, 2024
c278ee4
Update pod install path
AndrewGable Oct 2, 2024
fe2cb15
Remove cocoapods cache
AndrewGable Oct 2, 2024
0f080fb
Install pods in OldApp instead of NewApp
AndrewGable Oct 2, 2024
807b0d5
Try to fix Android
AndrewGable Oct 2, 2024
1bccb65
Remove tmate
AndrewGable Oct 2, 2024
d474388
Merge branch 'main' into andrew-mobile-deploy
AndrewGable Oct 24, 2024
850726f
Manually merge
AndrewGable Oct 24, 2024
da96e25
Test on push to branch
AndrewGable Oct 24, 2024
7fdd0f6
Generate a new version for HybridApp
AndrewGable Oct 24, 2024
bf934cc
Try to upload Android
AndrewGable Oct 24, 2024
f4f7101
Try to upload iOS
AndrewGable Oct 24, 2024
ce3f700
Fix iOS Fastlane syntax error
AndrewGable Oct 24, 2024
7fafef1
Add upload_testflight_hybrid lane
AndrewGable Oct 25, 2024
6ba96af
Speed up checkout and fix Android key error
AndrewGable Oct 25, 2024
ba01063
Add an explicit branch checkout
AndrewGable Oct 25, 2024
b078506
Add a fetch
AndrewGable Oct 25, 2024
9f3f530
Don't checkout branch
AndrewGable Oct 25, 2024
337223c
Try a different way to fetch submodule branch
AndrewGable Oct 25, 2024
ab87620
Use fetch depth in order to fetch submodule branch
AndrewGable Oct 25, 2024
4c0619e
Test upload to browserstack and artifacts
AndrewGable Oct 25, 2024
2d1cacb
Re-compile gh actions
AndrewGable Oct 25, 2024
77aa833
Fix JS tests
AndrewGable Oct 25, 2024
b775cd6
Try to fix source maps
AndrewGable Oct 25, 2024
be42ad5
Use env variables to get paths to artifacts
AndrewGable Oct 25, 2024
a7fe185
Fix workflow lint errors
AndrewGable Oct 25, 2024
2cc27ab
Update dsyms
AndrewGable Oct 25, 2024
8d3907d
Fix lint error
AndrewGable Oct 25, 2024
b251118
Upload HybridApp assets to the release
AndrewGable Oct 25, 2024
ca92b5d
Undo all testing, clean up for review
AndrewGable Oct 25, 2024
4d856ef
Fix lint
AndrewGable Oct 25, 2024
d3549e7
Remove fetch depth for max speed
AndrewGable Oct 26, 2024
9c84f16
Apply suggestions from code review
AndrewGable Oct 26, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,18 @@ inputs:
ANDROID:
description: "Android job result ('success', 'failure', 'cancelled', or 'skipped')"
required: true
ANDROID_HYBRID:
description: "Android job result ('success', 'failure', 'cancelled', or 'skipped')"
required: true
DESKTOP:
description: "Desktop job result ('success', 'failure', 'cancelled', or 'skipped')"
required: true
IOS:
description: "iOS job result ('success', 'failure', 'cancelled', or 'skipped')"
required: true
IOS_HYBRID:
description: "iOS job result ('success', 'failure', 'cancelled', or 'skipped')"
required: true
WEB:
description: "Web job result ('success', 'failure', 'cancelled', or 'skipped')"
required: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12710,8 +12710,10 @@ async function run() {
const isProd = ActionUtils.getJSONInput('IS_PRODUCTION_DEPLOY', { required: true });
const version = core.getInput('DEPLOY_VERSION', { required: true });
const androidResult = getDeployTableMessage(core.getInput('ANDROID', { required: true }));
const androidHybridResult = getDeployTableMessage(core.getInput('ANDROID_HYBRID', { required: true }));
const desktopResult = getDeployTableMessage(core.getInput('DESKTOP', { required: true }));
const iOSResult = getDeployTableMessage(core.getInput('IOS', { required: true }));
const iOSHybridResult = getDeployTableMessage(core.getInput('IOS_HYBRID', { required: true }));
const webResult = getDeployTableMessage(core.getInput('WEB', { required: true }));
const date = core.getInput('DATE');
const note = core.getInput('NOTE');
Expand All @@ -12724,6 +12726,7 @@ async function run() {
message += `🚀`;
message += `\n\nplatform | result\n---|---\n🤖 android 🤖|${androidResult}\n🖥 desktop 🖥|${desktopResult}`;
message += `\n🍎 iOS 🍎|${iOSResult}\n🕸 web 🕸|${webResult}`;
message += `\n🤖🔄 android HybridApp 🤖🔄|${androidHybridResult}\n🍎🔄 iOS HybridApp 🍎🔄|${iOSHybridResult}`;
if (deployVerb === 'Cherry-picked' && !/no ?qa/gi.test(prTitle ?? '')) {
// eslint-disable-next-line max-len
message +=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ async function run() {
const version = core.getInput('DEPLOY_VERSION', {required: true});

const androidResult = getDeployTableMessage(core.getInput('ANDROID', {required: true}) as PlatformResult);
const androidHybridResult = getDeployTableMessage(core.getInput('ANDROID_HYBRID', {required: true}) as PlatformResult);
const desktopResult = getDeployTableMessage(core.getInput('DESKTOP', {required: true}) as PlatformResult);
const iOSResult = getDeployTableMessage(core.getInput('IOS', {required: true}) as PlatformResult);
const iOSHybridResult = getDeployTableMessage(core.getInput('IOS_HYBRID', {required: true}) as PlatformResult);
const webResult = getDeployTableMessage(core.getInput('WEB', {required: true}) as PlatformResult);

const date = core.getInput('DATE');
Expand All @@ -67,6 +69,7 @@ async function run() {
message += `🚀`;
message += `\n\nplatform | result\n---|---\n🤖 android 🤖|${androidResult}\n🖥 desktop 🖥|${desktopResult}`;
message += `\n🍎 iOS 🍎|${iOSResult}\n🕸 web 🕸|${webResult}`;
message += `\n🤖🔄 android HybridApp 🤖🔄|${androidHybridResult}\n🍎🔄 iOS HybridApp 🍎🔄|${iOSHybridResult}`;

if (deployVerb === 'Cherry-picked' && !/no ?qa/gi.test(prTitle ?? '')) {
// eslint-disable-next-line max-len
Expand Down
61 changes: 61 additions & 0 deletions .github/workflows/createNewVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,64 @@ jobs:
uses: ./.github/actions/composite/announceFailedWorkflowInSlack
with:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}

createNewHybridVersion:
runs-on: macos-latest
needs: [validateActor, createNewVersion]
if: ${{ fromJSON(needs.validateActor.outputs.HAS_WRITE_ACCESS) }}
defaults:
run:
working-directory: Mobile-Expensify
steps:
- name: Run turnstyle
uses: softprops/turnstyle@49108bdfa571e62371bd2c3094893c547ab3fc03
with:
poll-interval-seconds: 10
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Checkout
uses: actions/checkout@v4
with:
repository: 'Expensify/Mobile-Expensify'
submodules: true
fetch-depth: 0
AndrewGable marked this conversation as resolved.
Show resolved Hide resolved
path: 'Mobile-Expensify'
token: ${{ secrets.OS_BOTIFY_COMMIT_TOKEN }}

- name: Update submodule
run: |
cd react-native
git submodule update --init

- name: Setup git for OSBotify
uses: ./.github/actions/composite/setupGitForOSBotify
id: setupGitForOSBotify
with:
GPG_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }}

- name: Generate version
run: |
SHORT_APP_VERSION=$(echo "$NEW_VERSION" | awk -F'-' '{print $1}')
BUILD_NUMBER=$(echo "$NEW_VERSION" | awk -F'-' '{print $2}')
tools/buildtools/bump-version-automatically.sh "$SHORT_APP_VERSION" "$BUILD_NUMBER"
env:
NEW_VERSION: ${{ needs.createNewVersion.outputs.NEW_VERSION }}

- name: Commit new version
run: |
git add \
./Android/AndroidManifest.xml \
./app/config/config.json \
./iOS/Expensify/Expensify-Info.plist\
./iOS/SmartScanExtension/Info.plist \
git commit -m "Update version to ${{ needs.createNewVersion.outputs.NEW_VERSION }}"

- name: Update main branch
run: git push origin main

- name: Announce failed workflow in Slack
if: ${{ failure() }}
uses: ./.github/actions/composite/announceFailedWorkflowInSlack
with:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
Loading
Loading