Skip to content

Commit

Permalink
Try to upload Android
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewGable committed Oct 24, 2024
1 parent 7fdd0f6 commit bf934cc
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 26 deletions.
52 changes: 26 additions & 26 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ jobs:
needs: prep
runs-on: ubuntu-latest-xl
# Only deploy HybridApp to staging
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
if: ${{ github.ref != 'refs/heads/production' }}
defaults:
run:
working-directory: Mobile-Expensify/react-native
Expand Down Expand Up @@ -254,30 +254,30 @@ jobs:
ANDROID_UPLOAD_KEYSTORE_ALIAS: ${{ steps.load-credentials.outputs.ANDROID_UPLOAD_KEYSTORE_ALIAS }}
ANDROID_UPLOAD_KEY_PASSWORD: ${{ steps.load-credentials.outputs.ANDROID_UPLOAD_KEY_PASSWORD }}

# - name: Upload Android app to Google Play
# run: bundle exec fastlane android ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) && 'upload_google_play_production' || 'upload_google_play_internal' }}
# env:
# VERSION: ${{ steps.getAndroidVersion.outputs.VERSION_CODE }}
#
# - name: Upload Android build to Browser Stack
# if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
# run: curl -u "$BROWSERSTACK" -X POST "https://api-cloud.browserstack.com/app-live/upload" -F "file=@./android/app/build/outputs/bundle/productionRelease/app-production-release.aab"
# env:
# BROWSERSTACK: ${{ secrets.BROWSERSTACK }}
#
# - name: Upload Android sourcemaps artifact
# if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
# uses: actions/upload-artifact@v4
# with:
# name: android-sourcemaps-artifact
# path: ./android/app/build/generated/sourcemaps/react/productionRelease/index.android.bundle.map
#
# - name: Upload Android build artifact
# if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
# uses: actions/upload-artifact@v4
# with:
# name: android-build-artifact
# path: ./android/app/build/outputs/bundle/productionRelease/app-production-release.aab
- name: Upload Android app to Google Play
run: bundle exec fastlane android upload_google_play_internal_hybrid
env:
VERSION: ${{ steps.getAndroidVersion.outputs.VERSION_CODE }}

- name: Upload Android build to Browser Stack
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
run: curl -u "$BROWSERSTACK" -X POST "https://api-cloud.browserstack.com/app-live/upload" -F "file=@../Android/build/outputs/bundle/release/Expensify-release.aab"
env:
BROWSERSTACK: ${{ secrets.BROWSERSTACK }}

- name: Upload Android sourcemaps artifact
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
uses: actions/upload-artifact@v4
with:
name: android-sourcemaps-artifact
path: ../Android/build/generated/sourcemaps/react/release/index.android.bundle.map

- name: Upload Android build artifact
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
uses: actions/upload-artifact@v4
with:
name: android-build-artifact
path: ../Android/build/outputs/bundle/release/Expensify-release.aab

- name: Set current App version in Env
run: echo "VERSION=$(npm run print-version --silent)" >> "$GITHUB_ENV"
Expand Down Expand Up @@ -473,7 +473,7 @@ jobs:
env:
DEVELOPER_DIR: /Applications/Xcode_15.2.0.app/Contents/Developer
# Only deploy HybridApp to staging
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
if: ${{ github.ref != 'refs/heads/production' }}
defaults:
run:
working-directory: Mobile-Expensify/react-native
Expand Down
13 changes: 13 additions & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,19 @@ platform :android do
)
end

desc "Upload HybridApp to Google Play for internal testing"
lane :upload_google_play_internal_hybrid do
# Google is very unreliable, so we retry a few times
ENV["SUPPLY_UPLOAD_MAX_RETRIES"]="5"
upload_to_play_store(
package_name: "org.me.mobiexpensifyg",
json_key: './android/app/android-fastlane-json-key.json',
aab: ENV[KEY_GRADLE_AAB_PATH],
track: 'alpha',
rollout: '1.0'
)
end

desc "Deploy app to Google Play production"
lane :upload_google_play_production do
# Google is very unreliable, so we retry a few times
Expand Down

0 comments on commit bf934cc

Please sign in to comment.