From 74f04761b5eeafc1196cd4a3569de70cb9c1ddbf Mon Sep 17 00:00:00 2001 From: Nikita Kuznetsov Date: Mon, 13 Nov 2023 13:02:08 +0400 Subject: [PATCH 01/15] Android cd Update java version Add sign cert Add android target options Android fixes Get store file from env Allow warning add compileOptions Upload artifacts Fix path for apks Update task Update path Work dir --- .github/workflows/cd-android.yml | 56 ++++++++++++++++++++++++ packages/mobile/android/app/build.gradle | 14 ++++++ 2 files changed, 70 insertions(+) create mode 100644 .github/workflows/cd-android.yml diff --git a/.github/workflows/cd-android.yml b/.github/workflows/cd-android.yml new file mode 100644 index 000000000..33bed051e --- /dev/null +++ b/.github/workflows/cd-android.yml @@ -0,0 +1,56 @@ +name: Android CD +on: + push: + branches: [ feature/ci-cd-android ] + + # Allows you to run this workflow manually from the Actions a tab + workflow_dispatch: + +jobs: + android-build: + name: android-build + strategy: + matrix: + os: [macos-13] + node-version: [18.18.0] + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout to git repository + uses: actions/checkout@v4 + + - name: Set up Node + uses: actions/setup-node@v3 + with: + cache: 'yarn' + node-version: ${{ matrix.node-version }} + + - name: Install yarn dependencies + run: yarn + + - name: Update Java home to 11 version + run: export JAVA_HOME=$JAVA_HOME_11_X64 + + - name: Decode signing certificate into a file + working-directory: './packages/mobile/android/app' + env: + CERTIFICATE_BASE64: ${{ secrets.ANDROID_DIST_SIGNING_KEY }} + run: | + echo $CERTIFICATE_BASE64 | base64 --decode > google-release.keystore + + - name: Build android Apk + working-directory: './packages/mobile' + run: yarn build:android:google-play + env: + TONKEEPER_UPLOAD_STORE_FILE: google-release.keystore + TONKEEPER_UPLOAD_KEY_ALIAS: ${{ secrets.TONKEEPER_UPLOAD_KEY_ALIAS }} + TONKEEPER_UPLOAD_STORE_PASSWORD: ${{ secrets.TONKEEPER_UPLOAD_STORE_PASSWORD }} + TONKEEPER_UPLOAD_KEY_PASSWORD: ${{ secrets.TONKEEPER_UPLOAD_KEY_PASSWORD }} + + - name: Upload android APK to artifacts + uses: actions/upload-artifact@v3 + with: + name: tonkeeper.aab + path: | + ./packages/mobile/android/app/build/outputs/bundle/release \ No newline at end of file diff --git a/packages/mobile/android/app/build.gradle b/packages/mobile/android/app/build.gradle index fdd93c319..fe3701f33 100644 --- a/packages/mobile/android/app/build.gradle +++ b/packages/mobile/android/app/build.gradle @@ -96,6 +96,15 @@ android { missingDimensionStrategy 'react-native-camera', 'general' } + compileOptions { + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget=11 + } + signingConfigs { release { if (project.hasProperty('TONKEEPER_UPLOAD_STORE_FILE')) { @@ -103,6 +112,11 @@ android { storePassword TONKEEPER_UPLOAD_STORE_PASSWORD keyAlias TONKEEPER_UPLOAD_KEY_ALIAS keyPassword TONKEEPER_UPLOAD_KEY_PASSWORD + } else { + storeFile = file(System.getenv("TONKEEPER_UPLOAD_STORE_FILE")) + storePassword System.getenv("TONKEEPER_UPLOAD_STORE_PASSWORD") + keyAlias System.getenv("TONKEEPER_UPLOAD_KEY_ALIAS") + keyPassword System.getenv("TONKEEPER_UPLOAD_KEY_PASSWORD") } } debug { From 254f8a306ee570847c38ba7aead67340154f4983 Mon Sep 17 00:00:00 2001 From: Nikita Kuznetsov Date: Sat, 18 Nov 2023 18:44:22 +0100 Subject: [PATCH 02/15] Update site and google play releases --- .github/workflows/cd-android.yml | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cd-android.yml b/.github/workflows/cd-android.yml index 33bed051e..47110f2f6 100644 --- a/.github/workflows/cd-android.yml +++ b/.github/workflows/cd-android.yml @@ -39,7 +39,7 @@ jobs: run: | echo $CERTIFICATE_BASE64 | base64 --decode > google-release.keystore - - name: Build android Apk + - name: Build Android Google Play Apk working-directory: './packages/mobile' run: yarn build:android:google-play env: @@ -48,9 +48,29 @@ jobs: TONKEEPER_UPLOAD_STORE_PASSWORD: ${{ secrets.TONKEEPER_UPLOAD_STORE_PASSWORD }} TONKEEPER_UPLOAD_KEY_PASSWORD: ${{ secrets.TONKEEPER_UPLOAD_KEY_PASSWORD }} - - name: Upload android APK to artifacts + - name: Upload android google play release to artifacts uses: actions/upload-artifact@v3 with: - name: tonkeeper.aab + name: Google Play Tonkeeper aab + path: | + ./packages/mobile/android/app/build/outputs/bundle/release + + - name: Clean + working-directory: './packages/mobile' + run: yarn clean:android + + - name: Build Android Site Apk + working-directory: './packages/mobile' + run: yarn build:android:apk-site + env: + TONKEEPER_UPLOAD_STORE_FILE: google-release.keystore + TONKEEPER_UPLOAD_KEY_ALIAS: ${{ secrets.TONKEEPER_UPLOAD_KEY_ALIAS }} + TONKEEPER_UPLOAD_STORE_PASSWORD: ${{ secrets.TONKEEPER_UPLOAD_STORE_PASSWORD }} + TONKEEPER_UPLOAD_KEY_PASSWORD: ${{ secrets.TONKEEPER_UPLOAD_KEY_PASSWORD }} + + - name: Upload android site release to artifacts + uses: actions/upload-artifact@v3 + with: + name: Site Tonkeeper aab path: | ./packages/mobile/android/app/build/outputs/bundle/release \ No newline at end of file From 886abcbd7350fc9d54a13eae3caa9d409c825631 Mon Sep 17 00:00:00 2001 From: Nikita Kuznetsov Date: Sat, 18 Nov 2023 19:08:03 +0100 Subject: [PATCH 03/15] Only Google Play version --- .github/workflows/cd-android.yml | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/.github/workflows/cd-android.yml b/.github/workflows/cd-android.yml index 47110f2f6..ed374cffe 100644 --- a/.github/workflows/cd-android.yml +++ b/.github/workflows/cd-android.yml @@ -53,24 +53,4 @@ jobs: with: name: Google Play Tonkeeper aab path: | - ./packages/mobile/android/app/build/outputs/bundle/release - - - name: Clean - working-directory: './packages/mobile' - run: yarn clean:android - - - name: Build Android Site Apk - working-directory: './packages/mobile' - run: yarn build:android:apk-site - env: - TONKEEPER_UPLOAD_STORE_FILE: google-release.keystore - TONKEEPER_UPLOAD_KEY_ALIAS: ${{ secrets.TONKEEPER_UPLOAD_KEY_ALIAS }} - TONKEEPER_UPLOAD_STORE_PASSWORD: ${{ secrets.TONKEEPER_UPLOAD_STORE_PASSWORD }} - TONKEEPER_UPLOAD_KEY_PASSWORD: ${{ secrets.TONKEEPER_UPLOAD_KEY_PASSWORD }} - - - name: Upload android site release to artifacts - uses: actions/upload-artifact@v3 - with: - name: Site Tonkeeper aab - path: | - ./packages/mobile/android/app/build/outputs/bundle/release \ No newline at end of file + ./packages/mobile/android/app/build/outputs/bundle \ No newline at end of file From 759ab667da586dbb5b1f5a2976eae54c0e9a0ccf Mon Sep 17 00:00:00 2001 From: Nikita Kuznetsov Date: Mon, 20 Nov 2023 09:53:40 +0100 Subject: [PATCH 04/15] Fix command --- .github/workflows/cd-android.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cd-android.yml b/.github/workflows/cd-android.yml index ed374cffe..c5c639be8 100644 --- a/.github/workflows/cd-android.yml +++ b/.github/workflows/cd-android.yml @@ -39,9 +39,9 @@ jobs: run: | echo $CERTIFICATE_BASE64 | base64 --decode > google-release.keystore - - name: Build Android Google Play Apk + - name: Build Android apk working-directory: './packages/mobile' - run: yarn build:android:google-play + run: yarn build:android:apk env: TONKEEPER_UPLOAD_STORE_FILE: google-release.keystore TONKEEPER_UPLOAD_KEY_ALIAS: ${{ secrets.TONKEEPER_UPLOAD_KEY_ALIAS }} @@ -51,6 +51,6 @@ jobs: - name: Upload android google play release to artifacts uses: actions/upload-artifact@v3 with: - name: Google Play Tonkeeper aab + name: Google Play Tonkeeper apk path: | - ./packages/mobile/android/app/build/outputs/bundle \ No newline at end of file + ./packages/mobile/android/app/build/outputs \ No newline at end of file From 223965d8f0ebbe3f371dd3050e0e11c918262f8a Mon Sep 17 00:00:00 2001 From: Nikita Kuznetsov Date: Wed, 22 Nov 2023 11:40:31 +0100 Subject: [PATCH 05/15] Android publish --- .github/workflows/cd-android.yml | 3 ++- packages/mobile/android/app/build.gradle | 5 +++++ packages/mobile/android/build.gradle | 1 + packages/mobile/package.json | 1 + 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cd-android.yml b/.github/workflows/cd-android.yml index c5c639be8..b18fd5a8a 100644 --- a/.github/workflows/cd-android.yml +++ b/.github/workflows/cd-android.yml @@ -41,12 +41,13 @@ jobs: - name: Build Android apk working-directory: './packages/mobile' - run: yarn build:android:apk + run: yarn build:android:publish env: TONKEEPER_UPLOAD_STORE_FILE: google-release.keystore TONKEEPER_UPLOAD_KEY_ALIAS: ${{ secrets.TONKEEPER_UPLOAD_KEY_ALIAS }} TONKEEPER_UPLOAD_STORE_PASSWORD: ${{ secrets.TONKEEPER_UPLOAD_STORE_PASSWORD }} TONKEEPER_UPLOAD_KEY_PASSWORD: ${{ secrets.TONKEEPER_UPLOAD_KEY_PASSWORD }} + ANDROID_PUBLISHER_CREDENTIALS: ${{ secrets.ANDROID_PUBLISHER_CREDENTIALS }} - name: Upload android google play release to artifacts uses: actions/upload-artifact@v3 diff --git a/packages/mobile/android/app/build.gradle b/packages/mobile/android/app/build.gradle index fe3701f33..8929937e5 100644 --- a/packages/mobile/android/app/build.gradle +++ b/packages/mobile/android/app/build.gradle @@ -4,6 +4,7 @@ plugins { id "com.android.application" id "com.google.gms.google-services" id "com.google.firebase.crashlytics" + id "com.github.triplet.play" version "3.8.6" } def projectRoot = rootDir.getAbsoluteFile().getParentFile().getAbsolutePath() @@ -140,6 +141,10 @@ android { } } +play { + track.set("internal") +} + // Apply static values from `gradle.properties` to the `android.packagingOptions` // Accepts values in comma delimited lists, example: // android.packagingOptions.pickFirsts=/LICENSE,**/picasa.ini diff --git a/packages/mobile/android/build.gradle b/packages/mobile/android/build.gradle index 776f800c7..c3c9e99e9 100644 --- a/packages/mobile/android/build.gradle +++ b/packages/mobile/android/build.gradle @@ -30,6 +30,7 @@ plugins { id 'com.android.library' version '7.4.2' apply false id 'org.jetbrains.kotlin.android' version '1.8.10' apply false id 'org.jetbrains.kotlin.jvm' version '1.8.10' apply false + id "com.github.triplet.play" version "3.8.6" } allprojects { diff --git a/packages/mobile/package.json b/packages/mobile/package.json index 2b876dcf3..8b630ded2 100644 --- a/packages/mobile/package.json +++ b/packages/mobile/package.json @@ -12,6 +12,7 @@ "clear-cache": "rm -rf tmp/haste-map-react-native-packager && rm -rf node_modules && yarn && yarn start --reset-cache", "build:android": "cd android && ./gradlew assembleRelease && ./gradlew bundleRelease && cd .. && node scripts/prepare_builds.js", "build:android:apk": "cd android && ./gradlew assembleRelease && cd ..", + "build:android:publish": "cd android && ./gradlew publishBundle && cd ..", "build:android:google-play": "git apply ../../patches/google-play-release.patch && yarn build:android:apk && git apply -R ../../patches/google-play-release.patch", "build:android:apk-site": "ENVFILE=.env.site yarn build:android:apk", "clean:android": "cd android && ./gradlew clean && cd ..", From 7c93d2426634cc83eab1043f175ba2a44bde0828 Mon Sep 17 00:00:00 2001 From: Nikita Kuznetsov Date: Wed, 22 Nov 2023 12:02:14 +0100 Subject: [PATCH 06/15] Fastlane Update paths Update variables Add cred content Add patch for google play Add plugin Add plugin Add plugin as gem Update param Update cert location Update path User full path Update aab path get aab path from context Update typing Add package name Update path for keystore Clean-up path Add version code Pass code version Update version Revert gradle_file_path Clean-up --- .github/workflows/cd-android.yml | 38 ++++++++---- packages/mobile/Gemfile | 3 +- packages/mobile/Gemfile.lock | 18 +++--- packages/mobile/android/app/build.gradle | 13 ++--- packages/mobile/android/build.gradle | 1 - packages/mobile/android/fastlane/Appfile | 2 + packages/mobile/android/fastlane/Fastfile | 70 +++++++++++++++++++++++ packages/mobile/package.json | 1 - 8 files changed, 114 insertions(+), 32 deletions(-) create mode 100644 packages/mobile/android/fastlane/Appfile create mode 100644 packages/mobile/android/fastlane/Fastfile diff --git a/.github/workflows/cd-android.yml b/.github/workflows/cd-android.yml index b18fd5a8a..39a24a6a8 100644 --- a/.github/workflows/cd-android.yml +++ b/.github/workflows/cd-android.yml @@ -29,6 +29,13 @@ jobs: - name: Install yarn dependencies run: yarn + - name: Set up Ruby and Gemfile dependencies + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + bundler-cache: true + working-directory: './packages/mobile' + - name: Update Java home to 11 version run: export JAVA_HOME=$JAVA_HOME_11_X64 @@ -39,19 +46,30 @@ jobs: run: | echo $CERTIFICATE_BASE64 | base64 --decode > google-release.keystore - - name: Build Android apk - working-directory: './packages/mobile' - run: yarn build:android:publish + - name: Decode service account into a file + working-directory: './packages/mobile/android' + env: + CREDENTIALS: ${{ secrets.ANDROID_PUBLISHER_CREDENTIALS }} + run: | + echo $CREDENTIALS > service-account.json + + - name: Patch for Google Play (remove REQUEST_INSTALL_PACKAGES) + run: | + git apply ./patches/google-play-release.patch + + - name: Build & deploy Android release + working-directory: './packages/mobile/android' + run: bundle exec fastlane android beta env: - TONKEEPER_UPLOAD_STORE_FILE: google-release.keystore - TONKEEPER_UPLOAD_KEY_ALIAS: ${{ secrets.TONKEEPER_UPLOAD_KEY_ALIAS }} - TONKEEPER_UPLOAD_STORE_PASSWORD: ${{ secrets.TONKEEPER_UPLOAD_STORE_PASSWORD }} - TONKEEPER_UPLOAD_KEY_PASSWORD: ${{ secrets.TONKEEPER_UPLOAD_KEY_PASSWORD }} - ANDROID_PUBLISHER_CREDENTIALS: ${{ secrets.ANDROID_PUBLISHER_CREDENTIALS }} + KEYSTORE_FILE: ${{ github.workspace }}/packages/mobile/android/app/google-release.keystore + KEYSTORE_PASSWORD: ${{ secrets.TONKEEPER_UPLOAD_STORE_PASSWORD }} + KEY_ALIAS: ${{ secrets.TONKEEPER_UPLOAD_KEY_ALIAS}} + KEY_PASSWORD: ${{ secrets.TONKEEPER_UPLOAD_KEY_PASSWORD }} + ANDROID_JSON_KEY_FILE: service-account.json - name: Upload android google play release to artifacts uses: actions/upload-artifact@v3 with: - name: Google Play Tonkeeper apk + name: Google Play Tonkeeper aab path: | - ./packages/mobile/android/app/build/outputs \ No newline at end of file + ${{ github.workspace }}/packages/mobile/android/app/build/outputs \ No newline at end of file diff --git a/packages/mobile/Gemfile b/packages/mobile/Gemfile index a7d1efafa..5d0a3998e 100644 --- a/packages/mobile/Gemfile +++ b/packages/mobile/Gemfile @@ -3,4 +3,5 @@ source 'https://rubygems.org' ruby ">= 2.6.10" gem 'cocoapods', '~> 1.13' gem 'activesupport', '>= 6.1.7.3', '< 7.1.0' -gem "fastlane" \ No newline at end of file +gem "fastlane" +gem "fastlane-plugin-increment_version_code" diff --git a/packages/mobile/Gemfile.lock b/packages/mobile/Gemfile.lock index e32a973e7..1577ec178 100644 --- a/packages/mobile/Gemfile.lock +++ b/packages/mobile/Gemfile.lock @@ -16,8 +16,8 @@ GEM artifactory (3.0.15) atomos (0.1.3) aws-eventstream (1.2.0) - aws-partitions (1.847.0) - aws-sdk-core (3.186.0) + aws-partitions (1.855.0) + aws-sdk-core (3.187.1) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.651.0) aws-sigv4 (~> 1.5) @@ -25,7 +25,7 @@ GEM aws-sdk-kms (1.72.0) aws-sdk-core (~> 3, >= 3.184.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.136.0) + aws-sdk-s3 (1.138.0) aws-sdk-core (~> 3, >= 3.181.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.6) @@ -78,8 +78,7 @@ GEM declarative (0.0.20) digest-crc (0.6.5) rake (>= 12.0.0, < 14.0.0) - domain_name (0.5.20190701) - unf (>= 0.0.5, < 1.0.0) + domain_name (0.6.20231109) dotenv (2.8.1) emoji_regex (3.2.3) escape (0.0.4) @@ -115,7 +114,7 @@ GEM faraday_middleware (1.2.0) faraday (~> 1.0) fastimage (2.2.7) - fastlane (2.216.0) + fastlane (2.217.0) CFPropertyList (>= 2.3, < 4.0.0) addressable (>= 2.8, < 3.0.0) artifactory (~> 3.0) @@ -155,11 +154,12 @@ GEM xcodeproj (>= 1.13.0, < 2.0.0) xcpretty (~> 0.3.0) xcpretty-travis-formatter (>= 0.0.3) + fastlane-plugin-increment_version_code (0.4.3) ffi (1.16.1) fourflusher (2.3.1) fuzzy_match (2.0.4) gh_inspector (1.1.3) - google-apis-androidpublisher_v3 (0.51.0) + google-apis-androidpublisher_v3 (0.53.0) google-apis-core (>= 0.11.0, < 2.a) google-apis-core (0.11.2) addressable (~> 2.5, >= 2.5.1) @@ -252,9 +252,6 @@ GEM tzinfo (2.0.6) concurrent-ruby (~> 1.0) uber (0.1.0) - unf (0.1.4) - unf_ext - unf_ext (0.0.8.2) unicode-display_width (2.5.0) webrick (1.8.1) word_wrap (1.0.0) @@ -278,6 +275,7 @@ DEPENDENCIES activesupport (>= 6.1.7.3, < 7.1.0) cocoapods (~> 1.13) fastlane + fastlane-plugin-increment_version_code RUBY VERSION ruby 3.2.2p53 diff --git a/packages/mobile/android/app/build.gradle b/packages/mobile/android/app/build.gradle index 8929937e5..659035efe 100644 --- a/packages/mobile/android/app/build.gradle +++ b/packages/mobile/android/app/build.gradle @@ -4,7 +4,6 @@ plugins { id "com.android.application" id "com.google.gms.google-services" id "com.google.firebase.crashlytics" - id "com.github.triplet.play" version "3.8.6" } def projectRoot = rootDir.getAbsoluteFile().getParentFile().getAbsolutePath() @@ -114,10 +113,10 @@ android { keyAlias TONKEEPER_UPLOAD_KEY_ALIAS keyPassword TONKEEPER_UPLOAD_KEY_PASSWORD } else { - storeFile = file(System.getenv("TONKEEPER_UPLOAD_STORE_FILE")) - storePassword System.getenv("TONKEEPER_UPLOAD_STORE_PASSWORD") - keyAlias System.getenv("TONKEEPER_UPLOAD_KEY_ALIAS") - keyPassword System.getenv("TONKEEPER_UPLOAD_KEY_PASSWORD") + storeFile file(project.property('android.injected.signing.store.file')) + storePassword project.property('android.injected.signing.store.password') + keyAlias project.property('android.injected.signing.key.alias') + keyPassword project.property('android.injected.signing.key.password') } } debug { @@ -141,10 +140,6 @@ android { } } -play { - track.set("internal") -} - // Apply static values from `gradle.properties` to the `android.packagingOptions` // Accepts values in comma delimited lists, example: // android.packagingOptions.pickFirsts=/LICENSE,**/picasa.ini diff --git a/packages/mobile/android/build.gradle b/packages/mobile/android/build.gradle index c3c9e99e9..776f800c7 100644 --- a/packages/mobile/android/build.gradle +++ b/packages/mobile/android/build.gradle @@ -30,7 +30,6 @@ plugins { id 'com.android.library' version '7.4.2' apply false id 'org.jetbrains.kotlin.android' version '1.8.10' apply false id 'org.jetbrains.kotlin.jvm' version '1.8.10' apply false - id "com.github.triplet.play" version "3.8.6" } allprojects { diff --git a/packages/mobile/android/fastlane/Appfile b/packages/mobile/android/fastlane/Appfile new file mode 100644 index 000000000..f1d2d100b --- /dev/null +++ b/packages/mobile/android/fastlane/Appfile @@ -0,0 +1,2 @@ +app_identifier('com.ton_keeper') + diff --git a/packages/mobile/android/fastlane/Fastfile b/packages/mobile/android/fastlane/Fastfile new file mode 100644 index 000000000..f0157a0b9 --- /dev/null +++ b/packages/mobile/android/fastlane/Fastfile @@ -0,0 +1,70 @@ +# This file contains the fastlane.tools configuration +# You can find the documentation at https://docs.fastlane.tools +# +# For a list of all available actions, check out +# +# https://docs.fastlane.tools/actions +# +# For a list of all available plugins, check out +# +# https://docs.fastlane.tools/plugins/available-plugins +# + +# Uncomment the line if you want fastlane to automatically update itself +# update_fastlane + + +platform :android do + + desc "Fetches the latest version code from the Play Console and increments it by 1" + lane :fetch_and_increment_build_number do + app_identifier = CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier) + + version_codes = google_play_track_version_codes( + package_name: app_identifier, + track: "internal", + json_key: ENV["ANDROID_JSON_KEY_FILE"] + ) + + updated_version_code = version_codes[0] + 1 + + increment_version_code( + gradle_file_path: "./app/build.gradle", + version_code: updated_version_code + ) + end + + desc "Build the android app for release" + lane :build_release do |options| + gradle( + task: "bundle", # or "assemble", if you want to build an APK + build_type: "Release", + properties: { + "android.injected.signing.store.file" => ENV["KEYSTORE_FILE"], + "android.injected.signing.store.password" => ENV["KEYSTORE_PASSWORD"], + "android.injected.signing.key.alias" => ENV["KEY_ALIAS"], + "android.injected.signing.key.password" => ENV["KEY_PASSWORD"], + } + ) + end + + desc "Upload to GooglePlay" + lane :upload_release do + aab_path = lane_context[SharedValues::GRADLE_AAB_OUTPUT_PATH] + app_identifier = CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier) + + upload_to_play_store( + track: "internal", + json_key: ENV["ANDROID_JSON_KEY_FILE"], + aab: aab_path, + package_name: app_identifier, + ) + end + + desc "Build and upload to GooglePlay" + lane :beta do + fetch_and_increment_build_number + build_release + upload_release + end +end \ No newline at end of file diff --git a/packages/mobile/package.json b/packages/mobile/package.json index 8b630ded2..2b876dcf3 100644 --- a/packages/mobile/package.json +++ b/packages/mobile/package.json @@ -12,7 +12,6 @@ "clear-cache": "rm -rf tmp/haste-map-react-native-packager && rm -rf node_modules && yarn && yarn start --reset-cache", "build:android": "cd android && ./gradlew assembleRelease && ./gradlew bundleRelease && cd .. && node scripts/prepare_builds.js", "build:android:apk": "cd android && ./gradlew assembleRelease && cd ..", - "build:android:publish": "cd android && ./gradlew publishBundle && cd ..", "build:android:google-play": "git apply ../../patches/google-play-release.patch && yarn build:android:apk && git apply -R ../../patches/google-play-release.patch", "build:android:apk-site": "ENVFILE=.env.site yarn build:android:apk", "clean:android": "cd android && ./gradlew clean && cd ..", From 5d580844f805a36e5a1ceb841bcdc61a686cfeb1 Mon Sep 17 00:00:00 2001 From: Nikita Kuznetsov Date: Thu, 23 Nov 2023 14:52:31 +0100 Subject: [PATCH 07/15] Join jobs --- .github/workflows/cd-android.yml | 75 -------------------------------- .github/workflows/cd.yml | 69 ++++++++++++++++++++++++++++- 2 files changed, 68 insertions(+), 76 deletions(-) delete mode 100644 .github/workflows/cd-android.yml diff --git a/.github/workflows/cd-android.yml b/.github/workflows/cd-android.yml deleted file mode 100644 index 39a24a6a8..000000000 --- a/.github/workflows/cd-android.yml +++ /dev/null @@ -1,75 +0,0 @@ -name: Android CD -on: - push: - branches: [ feature/ci-cd-android ] - - # Allows you to run this workflow manually from the Actions a tab - workflow_dispatch: - -jobs: - android-build: - name: android-build - strategy: - matrix: - os: [macos-13] - node-version: [18.18.0] - - runs-on: ${{ matrix.os }} - - steps: - - name: Checkout to git repository - uses: actions/checkout@v4 - - - name: Set up Node - uses: actions/setup-node@v3 - with: - cache: 'yarn' - node-version: ${{ matrix.node-version }} - - - name: Install yarn dependencies - run: yarn - - - name: Set up Ruby and Gemfile dependencies - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ matrix.ruby-version }} - bundler-cache: true - working-directory: './packages/mobile' - - - name: Update Java home to 11 version - run: export JAVA_HOME=$JAVA_HOME_11_X64 - - - name: Decode signing certificate into a file - working-directory: './packages/mobile/android/app' - env: - CERTIFICATE_BASE64: ${{ secrets.ANDROID_DIST_SIGNING_KEY }} - run: | - echo $CERTIFICATE_BASE64 | base64 --decode > google-release.keystore - - - name: Decode service account into a file - working-directory: './packages/mobile/android' - env: - CREDENTIALS: ${{ secrets.ANDROID_PUBLISHER_CREDENTIALS }} - run: | - echo $CREDENTIALS > service-account.json - - - name: Patch for Google Play (remove REQUEST_INSTALL_PACKAGES) - run: | - git apply ./patches/google-play-release.patch - - - name: Build & deploy Android release - working-directory: './packages/mobile/android' - run: bundle exec fastlane android beta - env: - KEYSTORE_FILE: ${{ github.workspace }}/packages/mobile/android/app/google-release.keystore - KEYSTORE_PASSWORD: ${{ secrets.TONKEEPER_UPLOAD_STORE_PASSWORD }} - KEY_ALIAS: ${{ secrets.TONKEEPER_UPLOAD_KEY_ALIAS}} - KEY_PASSWORD: ${{ secrets.TONKEEPER_UPLOAD_KEY_PASSWORD }} - ANDROID_JSON_KEY_FILE: service-account.json - - - name: Upload android google play release to artifacts - uses: actions/upload-artifact@v3 - with: - name: Google Play Tonkeeper aab - path: | - ${{ github.workspace }}/packages/mobile/android/app/build/outputs \ No newline at end of file diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 23afc2ba7..cf859763b 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -1,4 +1,4 @@ -name: iOS CD +name: Mobile CD on: # Allows you to run this workflow manually from the Actions a tab workflow_dispatch: @@ -72,3 +72,70 @@ jobs: path: | ./packages/mobile/ios/ton_keeper.ipa ./packages/mobile/ios/*.app.dSYM.zip + + android-playstore-build: + name: android-build + strategy: + matrix: + os: [macos-13] + node-version: [18.18.0] + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout to git repository + uses: actions/checkout@v4 + + - name: Set up Node + uses: actions/setup-node@v3 + with: + cache: 'yarn' + node-version: ${{ matrix.node-version }} + + - name: Install yarn dependencies + run: yarn + + - name: Set up Ruby and Gemfile dependencies + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + bundler-cache: true + working-directory: './packages/mobile' + + - name: Update Java home to 11 version + run: export JAVA_HOME=$JAVA_HOME_11_X64 + + - name: Decode signing certificate into a file + working-directory: './packages/mobile/android/app' + env: + CERTIFICATE_BASE64: ${{ secrets.ANDROID_DIST_SIGNING_KEY }} + run: | + echo $CERTIFICATE_BASE64 | base64 --decode > google-release.keystore + + - name: Decode service account into a file + working-directory: './packages/mobile/android' + env: + CREDENTIALS: ${{ secrets.ANDROID_PUBLISHER_CREDENTIALS }} + run: | + echo $CREDENTIALS > service-account.json + + - name: Patch for Google Play (remove REQUEST_INSTALL_PACKAGES) + run: | + git apply ./patches/google-play-release.patch + + - name: Build & deploy Android release + working-directory: './packages/mobile/android' + run: bundle exec fastlane android beta + env: + KEYSTORE_FILE: ${{ github.workspace }}/packages/mobile/android/app/google-release.keystore + KEYSTORE_PASSWORD: ${{ secrets.TONKEEPER_UPLOAD_STORE_PASSWORD }} + KEY_ALIAS: ${{ secrets.TONKEEPER_UPLOAD_KEY_ALIAS}} + KEY_PASSWORD: ${{ secrets.TONKEEPER_UPLOAD_KEY_PASSWORD }} + ANDROID_JSON_KEY_FILE: service-account.json + + - name: Upload android google play release to artifacts + uses: actions/upload-artifact@v3 + with: + name: Google Play Tonkeeper aab + path: | + ${{ github.workspace }}/packages/mobile/android/app/build/outputs \ No newline at end of file From db9cb3ab37e53546e7823950e15da3529651c6a1 Mon Sep 17 00:00:00 2001 From: Nikita Kuznetsov Date: Mon, 27 Nov 2023 12:43:02 +0100 Subject: [PATCH 08/15] Add log for build number --- packages/mobile/ios/fastlane/Fastfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/mobile/ios/fastlane/Fastfile b/packages/mobile/ios/fastlane/Fastfile index c4c45d524..7bd5b6fe9 100644 --- a/packages/mobile/ios/fastlane/Fastfile +++ b/packages/mobile/ios/fastlane/Fastfile @@ -84,6 +84,8 @@ platform :ios do increment_build_number( build_number: (latest_build_number + 1), ) + + puts "Build number " + (latest_build_number + 1) end desc "Build the iOS app for release" From 5c751e87d23cc46a05d0388c4d425bcfe5ab35f7 Mon Sep 17 00:00:00 2001 From: Nikita Kuznetsov Date: Mon, 27 Nov 2023 12:49:15 +0100 Subject: [PATCH 09/15] Android APK --- .github/workflows/cd-android.yml | 74 +++++++++++++++++++++++ .github/workflows/cd.yml | 4 +- packages/mobile/android/fastlane/Fastfile | 24 +++++++- 3 files changed, 98 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/cd-android.yml diff --git a/.github/workflows/cd-android.yml b/.github/workflows/cd-android.yml new file mode 100644 index 000000000..abfca5826 --- /dev/null +++ b/.github/workflows/cd-android.yml @@ -0,0 +1,74 @@ +name: Android CD +on: + push: + branches: [ feature/ci-cd-android ] + + # Allows you to run this workflow manually from the Actions a tab + workflow_dispatch: + +jobs: + android-site-build: + name: android-site-build + strategy: + matrix: + os: [macos-13] + node-version: [18.18.0] + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout to git repository + uses: actions/checkout@v4 + + - name: Set up Node + uses: actions/setup-node@v3 + with: + cache: 'yarn' + node-version: ${{ matrix.node-version }} + + - name: Install yarn dependencies + run: yarn + + - name: Set up Ruby and Gemfile dependencies + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + bundler-cache: true + working-directory: './packages/mobile' + + - name: Update Java home to 11 version + run: export JAVA_HOME=$JAVA_HOME_11_X64 + + - name: Update ENVFILE for site + run: export ENVFILE=.env.site + + - name: Decode signing certificate into a file + working-directory: './packages/mobile/android/app' + env: + CERTIFICATE_BASE64: ${{ secrets.ANDROID_DIST_SIGNING_KEY }} + run: | + echo $CERTIFICATE_BASE64 | base64 --decode > google-release.keystore + + - name: Decode service account into a file + working-directory: './packages/mobile/android' + env: + CREDENTIALS: ${{ secrets.ANDROID_PUBLISHER_CREDENTIALS }} + run: | + echo $CREDENTIALS > service-account.json + + - name: Build Android APK + working-directory: './packages/mobile/android' + run: bundle exec fastlane android apk + env: + KEYSTORE_FILE: ${{ github.workspace }}/packages/mobile/android/app/google-release.keystore + KEYSTORE_PASSWORD: ${{ secrets.TONKEEPER_UPLOAD_STORE_PASSWORD }} + KEY_ALIAS: ${{ secrets.TONKEEPER_UPLOAD_KEY_ALIAS}} + KEY_PASSWORD: ${{ secrets.TONKEEPER_UPLOAD_KEY_PASSWORD }} + ANDROID_JSON_KEY_FILE: service-account.json + + - name: Upload android google play release to artifacts + uses: actions/upload-artifact@v3 + with: + name: Google Play Tonkeeper apk + path: | + ${{ github.workspace }}/packages/mobile/android/app/build/outputs \ No newline at end of file diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index cf859763b..bdbdcf691 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -73,8 +73,8 @@ jobs: ./packages/mobile/ios/ton_keeper.ipa ./packages/mobile/ios/*.app.dSYM.zip - android-playstore-build: - name: android-build + android-store-build: + name: android-store-build strategy: matrix: os: [macos-13] diff --git a/packages/mobile/android/fastlane/Fastfile b/packages/mobile/android/fastlane/Fastfile index f0157a0b9..db3b75f74 100644 --- a/packages/mobile/android/fastlane/Fastfile +++ b/packages/mobile/android/fastlane/Fastfile @@ -34,10 +34,24 @@ platform :android do ) end - desc "Build the android app for release" + desc "Build the android aab for release" lane :build_release do |options| gradle( - task: "bundle", # or "assemble", if you want to build an APK + task: "bundle", + build_type: "Release", + properties: { + "android.injected.signing.store.file" => ENV["KEYSTORE_FILE"], + "android.injected.signing.store.password" => ENV["KEYSTORE_PASSWORD"], + "android.injected.signing.key.alias" => ENV["KEY_ALIAS"], + "android.injected.signing.key.password" => ENV["KEY_PASSWORD"], + } + ) + end + + desc "Build the android apk" + lane :assemble_release do |options| + gradle( + task: "assemble", build_type: "Release", properties: { "android.injected.signing.store.file" => ENV["KEYSTORE_FILE"], @@ -67,4 +81,10 @@ platform :android do build_release upload_release end + + desc "Build APK" + lane :apk do + fetch_and_increment_build_number + assemble_release + end end \ No newline at end of file From c4daf0e1fb07e53a3f1906e76b9b5490066c8085 Mon Sep 17 00:00:00 2001 From: Nikita Kuznetsov Date: Mon, 27 Nov 2023 12:59:38 +0100 Subject: [PATCH 10/15] Add code version --- .github/workflows/cd-android.yml | 2 +- .github/workflows/cd.yml | 4 ++-- packages/mobile/android/fastlane/Fastfile | 2 ++ packages/mobile/ios/fastlane/Fastfile | 7 +++++-- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cd-android.yml b/.github/workflows/cd-android.yml index abfca5826..a10e22fff 100644 --- a/.github/workflows/cd-android.yml +++ b/.github/workflows/cd-android.yml @@ -69,6 +69,6 @@ jobs: - name: Upload android google play release to artifacts uses: actions/upload-artifact@v3 with: - name: Google Play Tonkeeper apk + name: Google Play Tonkeeper apk ${{ env.VERSION_CODE }} path: | ${{ github.workspace }}/packages/mobile/android/app/build/outputs \ No newline at end of file diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index bdbdcf691..08913bb07 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -68,7 +68,7 @@ jobs: - name: Upload app-store ipa and dsyms to artifacts uses: actions/upload-artifact@v3 with: - name: app-store ipa & dsyms + name: app-store ipa & dsyms ${{ env.VERSION_CODE }} path: | ./packages/mobile/ios/ton_keeper.ipa ./packages/mobile/ios/*.app.dSYM.zip @@ -136,6 +136,6 @@ jobs: - name: Upload android google play release to artifacts uses: actions/upload-artifact@v3 with: - name: Google Play Tonkeeper aab + name: Google Play Tonkeeper aab ${{ env.VERSION_CODE }} path: | ${{ github.workspace }}/packages/mobile/android/app/build/outputs \ No newline at end of file diff --git a/packages/mobile/android/fastlane/Fastfile b/packages/mobile/android/fastlane/Fastfile index db3b75f74..05be5e20a 100644 --- a/packages/mobile/android/fastlane/Fastfile +++ b/packages/mobile/android/fastlane/Fastfile @@ -32,6 +32,8 @@ platform :android do gradle_file_path: "./app/build.gradle", version_code: updated_version_code ) + + sh("echo VERSION_CODE=#{updated_version_code} >> $GITHUB_ENV") end desc "Build the android aab for release" diff --git a/packages/mobile/ios/fastlane/Fastfile b/packages/mobile/ios/fastlane/Fastfile index 7bd5b6fe9..67714bb20 100644 --- a/packages/mobile/ios/fastlane/Fastfile +++ b/packages/mobile/ios/fastlane/Fastfile @@ -81,11 +81,14 @@ platform :ios do app_identifier: app_identifier ) + updated_version_code = latest_build_number + 1 + increment_build_number( - build_number: (latest_build_number + 1), + build_number: updated_version_code, ) - puts "Build number " + (latest_build_number + 1) + puts("Build number " + updated_version_code) + sh("echo VERSION_CODE=#{updated_version_code} >> $GITHUB_ENV") end desc "Build the iOS app for release" From 61121b45872e6c6b244b4c80f2aa40ef4195c530 Mon Sep 17 00:00:00 2001 From: Nikita Kuznetsov Date: Mon, 27 Nov 2023 13:07:12 +0100 Subject: [PATCH 11/15] Update ENVFILE for site --- .github/workflows/cd-android.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cd-android.yml b/.github/workflows/cd-android.yml index a10e22fff..fecc6613e 100644 --- a/.github/workflows/cd-android.yml +++ b/.github/workflows/cd-android.yml @@ -40,7 +40,8 @@ jobs: run: export JAVA_HOME=$JAVA_HOME_11_X64 - name: Update ENVFILE for site - run: export ENVFILE=.env.site + working-directory: './packages/mobile' + run: cp .env.site .env - name: Decode signing certificate into a file working-directory: './packages/mobile/android/app' From dd686c5704cacef7c8e40681ced0b10835908e1e Mon Sep 17 00:00:00 2001 From: Nikita Kuznetsov Date: Mon, 27 Nov 2023 13:12:43 +0100 Subject: [PATCH 12/15] Update name for a file --- .github/workflows/cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 08913bb07..14dec6ddb 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -68,7 +68,7 @@ jobs: - name: Upload app-store ipa and dsyms to artifacts uses: actions/upload-artifact@v3 with: - name: app-store ipa & dsyms ${{ env.VERSION_CODE }} + name: Tonkeeper ipa & dsyms ${{ env.VERSION_CODE }} path: | ./packages/mobile/ios/ton_keeper.ipa ./packages/mobile/ios/*.app.dSYM.zip From bf01b8f5cf1efc4e85e221b05834fa6b53d84954 Mon Sep 17 00:00:00 2001 From: Nikita Kuznetsov Date: Mon, 27 Nov 2023 13:16:49 +0100 Subject: [PATCH 13/15] Update names --- .github/workflows/cd-android.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cd-android.yml b/.github/workflows/cd-android.yml index fecc6613e..a0f893a9a 100644 --- a/.github/workflows/cd-android.yml +++ b/.github/workflows/cd-android.yml @@ -57,7 +57,7 @@ jobs: run: | echo $CREDENTIALS > service-account.json - - name: Build Android APK + - name: Build android apk working-directory: './packages/mobile/android' run: bundle exec fastlane android apk env: @@ -67,9 +67,9 @@ jobs: KEY_PASSWORD: ${{ secrets.TONKEEPER_UPLOAD_KEY_PASSWORD }} ANDROID_JSON_KEY_FILE: service-account.json - - name: Upload android google play release to artifacts + - name: Upload android apk to artifacts uses: actions/upload-artifact@v3 with: - name: Google Play Tonkeeper apk ${{ env.VERSION_CODE }} + name: Tonkeeper apk ${{ env.VERSION_CODE }} path: | ${{ github.workspace }}/packages/mobile/android/app/build/outputs \ No newline at end of file From ff35738b47388b4cc82a6375b6dc802b0d8309dc Mon Sep 17 00:00:00 2001 From: Nikita Kuznetsov Date: Mon, 27 Nov 2023 13:25:20 +0100 Subject: [PATCH 14/15] Build APK --- .github/workflows/cd-android.yml | 75 -------------------------------- .github/workflows/cd.yml | 67 ++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 75 deletions(-) delete mode 100644 .github/workflows/cd-android.yml diff --git a/.github/workflows/cd-android.yml b/.github/workflows/cd-android.yml deleted file mode 100644 index a0f893a9a..000000000 --- a/.github/workflows/cd-android.yml +++ /dev/null @@ -1,75 +0,0 @@ -name: Android CD -on: - push: - branches: [ feature/ci-cd-android ] - - # Allows you to run this workflow manually from the Actions a tab - workflow_dispatch: - -jobs: - android-site-build: - name: android-site-build - strategy: - matrix: - os: [macos-13] - node-version: [18.18.0] - - runs-on: ${{ matrix.os }} - - steps: - - name: Checkout to git repository - uses: actions/checkout@v4 - - - name: Set up Node - uses: actions/setup-node@v3 - with: - cache: 'yarn' - node-version: ${{ matrix.node-version }} - - - name: Install yarn dependencies - run: yarn - - - name: Set up Ruby and Gemfile dependencies - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ matrix.ruby-version }} - bundler-cache: true - working-directory: './packages/mobile' - - - name: Update Java home to 11 version - run: export JAVA_HOME=$JAVA_HOME_11_X64 - - - name: Update ENVFILE for site - working-directory: './packages/mobile' - run: cp .env.site .env - - - name: Decode signing certificate into a file - working-directory: './packages/mobile/android/app' - env: - CERTIFICATE_BASE64: ${{ secrets.ANDROID_DIST_SIGNING_KEY }} - run: | - echo $CERTIFICATE_BASE64 | base64 --decode > google-release.keystore - - - name: Decode service account into a file - working-directory: './packages/mobile/android' - env: - CREDENTIALS: ${{ secrets.ANDROID_PUBLISHER_CREDENTIALS }} - run: | - echo $CREDENTIALS > service-account.json - - - name: Build android apk - working-directory: './packages/mobile/android' - run: bundle exec fastlane android apk - env: - KEYSTORE_FILE: ${{ github.workspace }}/packages/mobile/android/app/google-release.keystore - KEYSTORE_PASSWORD: ${{ secrets.TONKEEPER_UPLOAD_STORE_PASSWORD }} - KEY_ALIAS: ${{ secrets.TONKEEPER_UPLOAD_KEY_ALIAS}} - KEY_PASSWORD: ${{ secrets.TONKEEPER_UPLOAD_KEY_PASSWORD }} - ANDROID_JSON_KEY_FILE: service-account.json - - - name: Upload android apk to artifacts - uses: actions/upload-artifact@v3 - with: - name: Tonkeeper apk ${{ env.VERSION_CODE }} - path: | - ${{ github.workspace }}/packages/mobile/android/app/build/outputs \ No newline at end of file diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 14dec6ddb..cfb8f526e 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -137,5 +137,72 @@ jobs: uses: actions/upload-artifact@v3 with: name: Google Play Tonkeeper aab ${{ env.VERSION_CODE }} + path: | + ${{ github.workspace }}/packages/mobile/android/app/build/outputs + + android-site-build: + name: android-site-build + strategy: + matrix: + os: [macos-13] + node-version: [18.18.0] + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout to git repository + uses: actions/checkout@v4 + + - name: Set up Node + uses: actions/setup-node@v3 + with: + cache: 'yarn' + node-version: ${{ matrix.node-version }} + + - name: Install yarn dependencies + run: yarn + + - name: Set up Ruby and Gemfile dependencies + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + bundler-cache: true + working-directory: './packages/mobile' + + - name: Update Java home to 11 version + run: export JAVA_HOME=$JAVA_HOME_11_X64 + + - name: Update ENVFILE for site + working-directory: './packages/mobile' + run: cp .env.site .env + + - name: Decode signing certificate into a file + working-directory: './packages/mobile/android/app' + env: + CERTIFICATE_BASE64: ${{ secrets.ANDROID_DIST_SIGNING_KEY }} + run: | + echo $CERTIFICATE_BASE64 | base64 --decode > google-release.keystore + + - name: Decode service account into a file + working-directory: './packages/mobile/android' + env: + CREDENTIALS: ${{ secrets.ANDROID_PUBLISHER_CREDENTIALS }} + run: | + echo $CREDENTIALS > service-account.json + + - name: Build android apk + working-directory: './packages/mobile/android' + run: bundle exec fastlane android apk + env: + KEYSTORE_FILE: ${{ github.workspace }}/packages/mobile/android/app/google-release.keystore + KEYSTORE_PASSWORD: ${{ secrets.TONKEEPER_UPLOAD_STORE_PASSWORD }} + KEY_ALIAS: ${{ secrets.TONKEEPER_UPLOAD_KEY_ALIAS}} + KEY_PASSWORD: ${{ secrets.TONKEEPER_UPLOAD_KEY_PASSWORD }} + ANDROID_JSON_KEY_FILE: service-account.json + + - name: Upload android apk to artifacts + uses: actions/upload-artifact@v3 + with: + name: Tonkeeper apk ${{ env.VERSION_CODE }} path: | ${{ github.workspace }}/packages/mobile/android/app/build/outputs \ No newline at end of file From d0dd25741f5ed4e414865d901211f417e933f072 Mon Sep 17 00:00:00 2001 From: Nikita Kuznetsov Date: Mon, 27 Nov 2023 13:36:28 +0100 Subject: [PATCH 15/15] Remove puts --- .github/workflows/cd.yml | 2 +- packages/mobile/ios/fastlane/Fastfile | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index cfb8f526e..15e813f03 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -136,7 +136,7 @@ jobs: - name: Upload android google play release to artifacts uses: actions/upload-artifact@v3 with: - name: Google Play Tonkeeper aab ${{ env.VERSION_CODE }} + name: Tonkeeper aab ${{ env.VERSION_CODE }} path: | ${{ github.workspace }}/packages/mobile/android/app/build/outputs diff --git a/packages/mobile/ios/fastlane/Fastfile b/packages/mobile/ios/fastlane/Fastfile index 67714bb20..5b8ea5ef0 100644 --- a/packages/mobile/ios/fastlane/Fastfile +++ b/packages/mobile/ios/fastlane/Fastfile @@ -87,7 +87,6 @@ platform :ios do build_number: updated_version_code, ) - puts("Build number " + updated_version_code) sh("echo VERSION_CODE=#{updated_version_code} >> $GITHUB_ENV") end