Skip to content

Commit

Permalink
try: take version_code dynamically
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowsheep1 committed Jul 26, 2024
1 parent a9391ae commit 65a06f9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,15 @@ jobs:
# We don't want to fail whole job if the dSYM upload step fails
continue-on-error: true
run: |
./scripts/android-release.sh ./android/app
./scripts/android-release.sh ./android/app
cd android
VERSION_CODE=$(sed -n 's/.*versionCode \(.*\)/\1/p' "app/build.gradle")
echo "VERSION_CODE=$VERSION_CODE" >> $GITHUB_ENV
bundle exec fastlane download_apk
env:
ENCODED_IOAPP_JSON_KEY_FILE: ${{secrets.ENCODED_IOAPP_JSON_KEY_FILE}}
RUBYOPT: '-rostruct' # TODO: Remove when https://github.com/fastlane/fastlane/pull/21950 gets released
VERSION_CODE: ${{ env.VERSION_CODE }}
- id: upload-universal-apk
# We don't want to fail whole job if the dSYM upload step fails
continue-on-error: true
Expand Down
3 changes: 2 additions & 1 deletion android/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,11 @@ platform :android do

desc "Download universal APK file from Google Play"
lane :download_apk do
version_code = ENV['VERSION_CODE'].to_i
download_universal_apk_from_google_play(
package_name: "it.pagopa.io.app",
destination: "io-app-universal.apk",
version_code: 100154837 # 2.67.0.2 TODO: to be set dynamically
version_code: version_code
)
end

Expand Down

0 comments on commit 65a06f9

Please sign in to comment.