Skip to content

Commit

Permalink
Properly pass version code to fastlane
Browse files Browse the repository at this point in the history
  • Loading branch information
roryabraham committed Apr 8, 2021
1 parent a6d2243 commit f76e1aa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
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

0 comments on commit f76e1aa

Please sign in to comment.