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

Properly pass Android version code to fastlane #2292

Merged
merged 1 commit into from
Apr 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 4 additions & 5 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ jobs:
env:
LARGE_SECRET_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }}

- name: Set version in ENV
run: echo "VERSION_CODE=$(grep -o 'versionCode\s\+\d\+' android/app/build.gradle | awk '{ print $2 }')" >> $GITHUB_ENV

- name: Run Fastlane beta
if: ${{ env.SHOULD_DEPLOY_PRODUCTION == 'false' }}
run: bundle exec fastlane android beta
Expand All @@ -52,7 +55,7 @@ jobs:
if: ${{ env.SHOULD_DEPLOY_PRODUCTION == 'true' }}
run: bundle exec fastlane android production
env:
VERSION: ${{ env.VERSION }}
VERSION: ${{ env.VERSION_CODE }}

# These Slack steps are duplicated in all workflows, if you make a change to this step, make sure to update all
# the other workflows with the same changes
Expand All @@ -74,7 +77,3 @@ jobs:
env:
GITHUB_TOKEN: ${{ github.token }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}

- name: Set version in ENV
if: ${{ success() }}
run: echo "VERSION=$(npm run print-version --silent)" >> $GITHUB_ENV
2 changes: 1 addition & 1 deletion fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ platform :android do
upload_to_play_store(
package_name: "com.expensify.chat",
json_key: './android/app/android-fastlane-json-key.json',
version_code: ENV["VERSION"],
version_code: ENV["VERSION_CODE"],
track: 'internal',
track_promote_to: 'production',
rollout: '1.0',
Expand Down