Skip to content

Commit

Permalink
Merge branch 'main' into feat/55158-settle-up-feature
Browse files Browse the repository at this point in the history
  • Loading branch information
koko57 committed Jan 31, 2025
2 parents dfc0a06 + 4016070 commit e6b0937
Show file tree
Hide file tree
Showing 91 changed files with 1,837 additions and 1,528 deletions.
1 change: 1 addition & 0 deletions .github/workflows/cherryPick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
with:
ref: staging
token: ${{ secrets.OS_BOTIFY_TOKEN }}
submodules: true

- name: Set up git for OSBotify
id: setupGitForOSBotify
Expand Down
89 changes: 67 additions & 22 deletions .github/workflows/compareNDandODbuilds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
jobs:
buildHybridAppAndroid:
name: Build HybridApp Android
runs-on: macos-15-xlarge
runs-on: ubuntu-latest-xl
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -30,23 +30,65 @@ jobs:
with:
IS_HYBRID_BUILD: 'true'

- name: Run grunt build
run: |
cd Mobile-Expensify
npm run grunt:build:shared
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'oracle'
java-version: '17'

- name: Setup Ruby
uses: ruby/[email protected]
with:
bundler-cache: true

- name: Install New Expensify Gems
run: bundle install

- name: Install 1Password CLI
uses: 1password/install-cli-action@v1

- name: Load files from 1Password
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
run: |
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 Mobile-Expensify/Android
- name: Load Android upload keystore credentials from 1Password
id: load-credentials
uses: 1password/load-secrets-action@v2
with:
export-env: false
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
ANDROID_UPLOAD_KEYSTORE_PASSWORD: op://Mobile-Deploy-CI/Repository-Secrets/ANDROID_UPLOAD_KEYSTORE_PASSWORD
ANDROID_UPLOAD_KEYSTORE_ALIAS: op://Mobile-Deploy-CI/Repository-Secrets/ANDROID_UPLOAD_KEYSTORE_ALIAS
ANDROID_UPLOAD_KEY_PASSWORD: op://Mobile-Deploy-CI/Repository-Secrets/ANDROID_UPLOAD_KEY_PASSWORD

- name: Build Android Release
working-directory: Mobile-Expensify/Android
run: |
if ! ./gradlew --profile assembleRelease
then
echo "❌ Android HybridApp failed to build: Please reach out to Contributor+ and/or Expensify engineers for help in #expensify-open-source to resolve."
exit 1
else
echo "✅ Build succeeded. Printing Gradle profile report:"
# Print the latest generated profile report
PROFILE_REPORT=$(find build/reports/profile -maxdepth 1 -type f)
cat "$PROFILE_REPORT"
fi
./gradlew --profile assembleRelease \
-Pandroid.injected.signing.store.file="./upload-key.keystore" \
-Pandroid.injected.signing.store.password=${{ steps.load-credentials.outputs.ANDROID_UPLOAD_KEYSTORE_PASSWORD }} \
-Pandroid.injected.signing.key.alias=${{ steps.load-credentials.outputs.ANDROID_UPLOAD_KEYSTORE_ALIAS }} \
-Pandroid.injected.signing.key.password=${{ steps.load-credentials.outputs.ANDROID_UPLOAD_KEY_PASSWORD }}
echo "Printing Gradle profile report:"
# Print the latest generated profile report
PROFILE_REPORT=$(find build/reports/profile -maxdepth 1 -type f)
cat "$PROFILE_REPORT"
buildStandaloneAndroid:
name: Build Standalone Android
runs-on: macos-15-xlarge
runs-on: ubuntu-latest-xl
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -62,16 +104,19 @@ jobs:
with:
IS_HYBRID_BUILD: 'false'

- name: Decrypt keystore to sign the APK/AAB
run: gpg --batch --yes --decrypt --passphrase="${{ secrets.LARGE_SECRET_PASSPHRASE }}" --output my-upload-key.keystore my-upload-key.keystore.gpg
working-directory: android/app

- name: Build Android Release
working-directory: android
env:
MYAPP_UPLOAD_STORE_PASSWORD: ${{ secrets.MYAPP_UPLOAD_STORE_PASSWORD }}
MYAPP_UPLOAD_KEY_PASSWORD: ${{ secrets.MYAPP_UPLOAD_KEY_PASSWORD }}
run: |
if ! ./gradlew --profile assembleProductionRelease
then
echo "❌ Android Standalone failed to build: Please reach out to Contributor+ and/or Expensify engineers for help in #expensify-open-source to resolve."
exit 1
else
echo "✅ Build succeeded. Printing Gradle profile report:"
# Print the latest generated profile report
PROFILE_REPORT=$(find build/reports/profile -maxdepth 1 -type f)
cat "$PROFILE_REPORT"
fi
./gradlew --profile assembleProductionRelease
echo "Printing Gradle profile report:"
# Print the latest generated profile report
PROFILE_REPORT=$(find build/reports/profile -maxdepth 1 -type f)
cat "$PROFILE_REPORT"
80 changes: 20 additions & 60 deletions .github/workflows/createNewVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ jobs:
uses: actions/checkout@v4
with:
ref: main
submodules: true
# The OS_BOTIFY_COMMIT_TOKEN is a personal access token tied to osbotify
# This is a workaround to allow pushes to a protected branch
token: ${{ secrets.OS_BOTIFY_COMMIT_TOKEN }}
Expand All @@ -75,70 +76,24 @@ jobs:
with:
GPG_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }}

- name: Generate version
- name: Generate new E/App version
id: bumpVersion
uses: ./.github/actions/javascript/bumpVersion
with:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_COMMIT_TOKEN }}
SEMVER_LEVEL: ${{ inputs.SEMVER_LEVEL }}

- name: Commit new version
run: |
git add \
./package.json \
./package-lock.json \
./android/app/build.gradle \
./ios/NewExpensify/Info.plist \
./ios/NewExpensifyTests/Info.plist \
./ios/NotificationServiceExtension/Info.plist
git commit -m "Update version to ${{ steps.bumpVersion.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 }}

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

- name: Check out `App` repo
uses: actions/checkout@v4
with:
ref: main
submodules: true
# The OS_BOTIFY_COMMIT_TOKEN is a personal access token tied to osbotify
# This is a workaround to allow pushes to a protected branch
token: ${{ secrets.OS_BOTIFY_COMMIT_TOKEN }}

- name: Update submodule and checkout the main branch
- name: Update Mobile-Expensify submodule with the latest state of the Mobile-Expensify main branch
run: |
git submodule update --init
cd Mobile-Expensify
git fetch --depth=1 origin main
git checkout main
git pull origin main
- name: Setup git for OSBotify
uses: ./.github/actions/composite/setupGitForOSBotify
id: setupGitForOSBotify
with:
GPG_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }}
git reset --hard origin/main
- name: Generate HybridApp version
run: |
cd Mobile-Expensify
# Generate all flavors of the version
SHORT_APP_VERSION=$(echo "$NEW_VERSION" | awk -F'-' '{print $1}')
BUILD_NUMBER=$(echo "$NEW_VERSION" | awk -F'-' '{print $2}')
Expand Down Expand Up @@ -167,9 +122,9 @@ jobs:
# Update JS HybridApp Version
sed -i .bak -E "s/\"version\": \"([0-9\.]*)\"/\"version\": \"$FULL_APP_VERSION\"/" $JS_CONFIG_FILE
env:
NEW_VERSION: ${{ needs.createNewVersion.outputs.NEW_VERSION }}
NEW_VERSION: ${{ steps.bumpVersion.outputs.NEW_VERSION }}

- name: Commit new version
- name: Commit new Mobile-Expensify version
run: |
cd Mobile-Expensify
git add \
Expand All @@ -178,16 +133,21 @@ jobs:
./iOS/Expensify/Expensify-Info.plist\
./iOS/SmartScanExtension/Info.plist \
./iOS/NotificationServiceExtension/Info.plist
git commit -m "Update version to ${{ needs.createNewVersion.outputs.NEW_VERSION }}"
git commit -m "Update version to ${{ steps.bumpVersion.outputs.NEW_VERSION }}"
git push origin main
- name: Update main branch on Mobile-Expensify and App
- name: Commit new E/App version
run: |
cd Mobile-Expensify
git add \
./Mobile-Expensify \
./package.json \
./package-lock.json \
./android/app/build.gradle \
./ios/NewExpensify/Info.plist \
./ios/NewExpensifyTests/Info.plist \
./ios/NotificationServiceExtension/Info.plist
git commit -m "Update version to ${{ steps.bumpVersion.outputs.NEW_VERSION }}"
git push origin main
cd ..
git add Mobile-Expensify
git commit -m "Update Mobile-Expensify to ${{ needs.createNewVersion.outputs.NEW_VERSION }}"
git push origin main
- name: Announce failed workflow in Slack
if: ${{ failure() }}
Expand Down
2 changes: 1 addition & 1 deletion Mobile-Expensify
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1009009200
versionName "9.0.92-0"
versionCode 1009009202
versionName "9.0.92-2"
// Supported language variants must be declared here to avoid from being removed during the compilation.
// This also helps us to not include unnecessary language variants in the APK.
resConfigs "en", "es"
Expand Down
Loading

0 comments on commit e6b0937

Please sign in to comment.