From 3457c7ef51c8089b05dbe0e261ed3b326d6ae41c Mon Sep 17 00:00:00 2001 From: Dmitry Borodin Date: Tue, 11 Apr 2023 17:49:09 -0300 Subject: [PATCH 01/26] release flow work in progress --- .github/workflows/android-release.yml | 151 ++++++++++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 .github/workflows/android-release.yml diff --git a/.github/workflows/android-release.yml b/.github/workflows/android-release.yml new file mode 100644 index 0000000000..b5e5c10c10 --- /dev/null +++ b/.github/workflows/android-release.yml @@ -0,0 +1,151 @@ +name: Release android app + +on: + push: + branches: + - master + tags: + - 'v*' +jobs: + build: + name: Build + runs-on: ubuntu-22.04 + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 # 0.11.0 + with: + access_token: ${{ github.token }} + + - name: Checkout Sources + uses: actions/checkout@v3.5.0 + with: + fetch-depth: 50 + submodules: 'recursive' + + - name: Install System Dependencies (Linux) + run: | + sudo apt-get update + sudo apt-get install -y clang libclang-dev libopencv-dev + + - name: Install Rust stable toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + - name: Install uniffi_bindgen + uses: actions-rs/install@v0.1 + with: + crate: uniffi_bindgen + version: 0.22.0 # Must be in sync with version in Cargo.toml + use-tool-cache: true + + - name: Install additional rust targets + run: rustup target add aarch64-linux-android armv7-linux-androideabi x86_64-linux-android + + - name: Set up JDK environment + uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: 11 + + - name: Install NDK + run: echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;24.0.8215888" --sdk_root=${ANDROID_SDK_ROOT} + + - name: Rust Cache + uses: Swatinem/rust-cache@6fd3edff6979b79f87531400ad694fb7f2c84b1f # v2.2.1 + with: + workspaces: rust -> rust/target + + - name: Gradle Cache + uses: actions/cache@v3 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + + - name: Build + run: | + ./gradlew :android:testDebugUnitTest + + release: + name: Build unsigned APKs + runs-on: ubuntu-22.04 + # if: github.ref == ' refs/head/main' + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 # 0.11.0 + with: + access_token: ${{ github.token }} + + - name: Checkout Sources + uses: actions/checkout@v3.5.0 + with: + fetch-depth: 50 + submodules: 'recursive' + + - name: Install System Dependencies (Linux) + if: runner.os == 'Linux' + run: | + sudo apt-get update + sudo apt-get install -y clang libclang-dev libopencv-dev + + - name: Install Rust stable toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + - name: Install uniffi_bindgen + uses: actions-rs/install@v0.1 + with: + crate: uniffi_bindgen + version: 0.22.0 # Must be in sync with version in Cargo.toml + use-tool-cache: true + + - name: Install additional rust targets + run: rustup target add aarch64-linux-android armv7-linux-androideabi x86_64-linux-android + + - name: Set up JDK environment + uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: 11 + + - name: Install NDK + run: echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;24.0.8215888" --sdk_root=${ANDROID_SDK_ROOT} + + - name: Rust Cache + uses: Swatinem/rust-cache@6fd3edff6979b79f87531400ad694fb7f2c84b1f # v2.2.1 + with: + workspaces: rust -> rust/target + +# build and publish + #TODO DMITRY CHECK + + - name: Sign app APK + uses: r0adkll/sign-android-release@v1 + # ID used to access action output + id: sign_app + with: + releaseDirectory: app/build/outputs/apk/release + signingKeyBase64: ${{ secrets.SIGNING_KEY }} + alias: ${{ secrets.ALIAS }} + keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} + keyPassword: ${{ secrets.KEY_PASSWORD }} + + + - name: Publish to Google Play Store + uses: r0adkll/upload-google-play@v1.1.0 + with: + service_account_json: ${{ secrets.GOOGLE_PLAY_API_JSON }} + bundle_file: ${{steps.sign_app.outputs.signedReleaseFile}} + track: 'internal' + + + From 741c380e9c94d2b828713e422e181df3045f7572 Mon Sep 17 00:00:00 2001 From: Dmitry Borodin Date: Tue, 11 Apr 2023 20:45:02 -0300 Subject: [PATCH 02/26] fix current task description --- .github/workflows/android-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/android-app.yml b/.github/workflows/android-app.yml index 24f1b74bcc..86800d1111 100644 --- a/.github/workflows/android-app.yml +++ b/.github/workflows/android-app.yml @@ -135,7 +135,7 @@ jobs: restore-keys: | ${{ runner.os }}-gradle- - - name: Assemble GPlay unsigned apk + - name: Assemble unsigned debug apk run: | ./gradlew clean assembleDebug --stacktrace From 826062ec53aa71af387bbcffd09241ee56884a4b Mon Sep 17 00:00:00 2001 From: Dmitry Borodin Date: Tue, 11 Apr 2023 21:15:21 -0300 Subject: [PATCH 03/26] release flow updated to what it probably should be --- .github/workflows/android-release.yml | 30 ++++++++++++++++++--------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/.github/workflows/android-release.yml b/.github/workflows/android-release.yml index b5e5c10c10..0d493e18a3 100644 --- a/.github/workflows/android-release.yml +++ b/.github/workflows/android-release.yml @@ -125,27 +125,37 @@ jobs: with: workspaces: rust -> rust/target -# build and publish - #TODO DMITRY CHECK - - name: Sign app APK + # build and publish + + - name: Assemble release unsigned apk + run: | + ./gradlew clean assembleRelease --stacktrace + + - name: Sign app APK uses: r0adkll/sign-android-release@v1 # ID used to access action output id: sign_app with: - releaseDirectory: app/build/outputs/apk/release + releaseDirectory: android/build/outputs/apk/release signingKeyBase64: ${{ secrets.SIGNING_KEY }} alias: ${{ secrets.ALIAS }} keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} keyPassword: ${{ secrets.KEY_PASSWORD }} + - name: Upload Gplay release APKs + uses: actions/upload-artifact@v3 + with: + name: signer-release-signed + path: | + android/build/outputs/apk/release/*.apk - - name: Publish to Google Play Store - uses: r0adkll/upload-google-play@v1.1.0 - with: - service_account_json: ${{ secrets.GOOGLE_PLAY_API_JSON }} - bundle_file: ${{steps.sign_app.outputs.signedReleaseFile}} - track: 'internal' + - name: Publish to Google Play Store + uses: r0adkll/upload-google-play@v1.1.0 + with: + service_account_json: ${{ secrets.GOOGLE_PLAY_API_JSON }} + bundle_file: ${{steps.sign_app.outputs.signedReleaseFile}} + track: 'internal' From b26afa3738cc8e90e4a5c5fb28135b6fa7b6fd8d Mon Sep 17 00:00:00 2001 From: Dmitry Borodin Date: Wed, 12 Apr 2023 12:15:14 -0300 Subject: [PATCH 04/26] keys passed --- .github/workflows/android-release.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/android-release.yml b/.github/workflows/android-release.yml index 0d493e18a3..502e8c8418 100644 --- a/.github/workflows/android-release.yml +++ b/.github/workflows/android-release.yml @@ -138,24 +138,24 @@ jobs: id: sign_app with: releaseDirectory: android/build/outputs/apk/release - signingKeyBase64: ${{ secrets.SIGNING_KEY }} - alias: ${{ secrets.ALIAS }} - keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} - keyPassword: ${{ secrets.KEY_PASSWORD }} + signingKeyBase64: ${{ secrets.ANDROID_PLAY_STORE_KEYSTORE_BASE64 }} + alias: ${{ secrets.ANDROID_KEYSTORE_KEY_ALIAS }} + keyStorePassword: ${{ secrets.ANDROID_PLAY_STORE_KEYSTORE_PASSWORD }} + keyPassword: ${{ secrets.ANDROID_PLAY_STORE_KEYSTORE_PASSWORD }} - name: Upload Gplay release APKs uses: actions/upload-artifact@v3 with: name: signer-release-signed path: | - android/build/outputs/apk/release/*.apk - - - name: Publish to Google Play Store - uses: r0adkll/upload-google-play@v1.1.0 - with: - service_account_json: ${{ secrets.GOOGLE_PLAY_API_JSON }} - bundle_file: ${{steps.sign_app.outputs.signedReleaseFile}} - track: 'internal' + ${{steps.sign_app.outputs.signedReleaseFile}} + +# - name: Publish to Google Play Store +# uses: r0adkll/upload-google-play@v1.1.0 +# with: +# service_account_json: ${{ secrets.ANDROID_PLAY_STORE_API_JSON }} +# bundle_file: ${{steps.sign_app.outputs.signedReleaseFile}} +# track: 'internal' From fd4d19ae36d01f2eddd213011e82e7460015b4c2 Mon Sep 17 00:00:00 2001 From: Dmitry Borodin Date: Wed, 12 Apr 2023 12:18:38 -0300 Subject: [PATCH 05/26] yaml error fix --- .github/workflows/android-release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/android-release.yml b/.github/workflows/android-release.yml index 502e8c8418..3d7f4e8e64 100644 --- a/.github/workflows/android-release.yml +++ b/.github/workflows/android-release.yml @@ -129,8 +129,7 @@ jobs: # build and publish - name: Assemble release unsigned apk - run: | - ./gradlew clean assembleRelease --stacktrace + run: ./gradlew clean assembleRelease --stacktrace - name: Sign app APK uses: r0adkll/sign-android-release@v1 From bebee0514a2fde200bd7bac95b36b51aef9cc7fe Mon Sep 17 00:00:00 2001 From: Dmitry Borodin Date: Wed, 12 Apr 2023 12:20:02 -0300 Subject: [PATCH 06/26] yaml error fix 2 --- .github/workflows/android-release.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/android-release.yml b/.github/workflows/android-release.yml index 3d7f4e8e64..713089bcea 100644 --- a/.github/workflows/android-release.yml +++ b/.github/workflows/android-release.yml @@ -129,18 +129,18 @@ jobs: # build and publish - name: Assemble release unsigned apk - run: ./gradlew clean assembleRelease --stacktrace + run: ./gradlew clean assembleRelease --stacktrace - name: Sign app APK - uses: r0adkll/sign-android-release@v1 - # ID used to access action output - id: sign_app - with: - releaseDirectory: android/build/outputs/apk/release - signingKeyBase64: ${{ secrets.ANDROID_PLAY_STORE_KEYSTORE_BASE64 }} - alias: ${{ secrets.ANDROID_KEYSTORE_KEY_ALIAS }} - keyStorePassword: ${{ secrets.ANDROID_PLAY_STORE_KEYSTORE_PASSWORD }} - keyPassword: ${{ secrets.ANDROID_PLAY_STORE_KEYSTORE_PASSWORD }} + uses: r0adkll/sign-android-release@v1 + # ID used to access action output + id: sign_app + with: + releaseDirectory: android/build/outputs/apk/release + signingKeyBase64: ${{ secrets.ANDROID_PLAY_STORE_KEYSTORE_BASE64 }} + alias: ${{ secrets.ANDROID_KEYSTORE_KEY_ALIAS }} + keyStorePassword: ${{ secrets.ANDROID_PLAY_STORE_KEYSTORE_PASSWORD }} + keyPassword: ${{ secrets.ANDROID_PLAY_STORE_KEYSTORE_PASSWORD }} - name: Upload Gplay release APKs uses: actions/upload-artifact@v3 From 1452725e5e08be910323f2ddb2a8d5a45825f298 Mon Sep 17 00:00:00 2001 From: Dmitry Borodin Date: Wed, 12 Apr 2023 12:31:30 -0300 Subject: [PATCH 07/26] yaml error fix 3 --- .github/workflows/android-release.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/android-release.yml b/.github/workflows/android-release.yml index 713089bcea..d7facd86f9 100644 --- a/.github/workflows/android-release.yml +++ b/.github/workflows/android-release.yml @@ -128,8 +128,9 @@ jobs: # build and publish - - name: Assemble release unsigned apk - run: ./gradlew clean assembleRelease --stacktrace + - name: Assemble release unsigned apk + run: | + ./gradlew clean assembleRelease --stacktrace - name: Sign app APK uses: r0adkll/sign-android-release@v1 From f0e3ae20c4d9353e7ac1332ebc889519fb9461b9 Mon Sep 17 00:00:00 2001 From: Dmitry Borodin Date: Wed, 12 Apr 2023 16:07:02 -0300 Subject: [PATCH 08/26] yaml error fix 4 not relevant --- .github/workflows/android-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/android-release.yml b/.github/workflows/android-release.yml index d7facd86f9..ef543a4f75 100644 --- a/.github/workflows/android-release.yml +++ b/.github/workflows/android-release.yml @@ -73,7 +73,7 @@ jobs: ./gradlew :android:testDebugUnitTest release: - name: Build unsigned APKs + name: Build signed APKs runs-on: ubuntu-22.04 # if: github.ref == ' refs/head/main' steps: @@ -126,7 +126,7 @@ jobs: workspaces: rust -> rust/target - # build and publish + # Build and publish - name: Assemble release unsigned apk run: | From a1736ea687c259c2f269f5808adb59a54ecba9d0 Mon Sep 17 00:00:00 2001 From: Dmitry Borodin Date: Wed, 12 Apr 2023 16:13:29 -0300 Subject: [PATCH 09/26] test workflow changes --- .github/workflows/android-release.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/android-release.yml b/.github/workflows/android-release.yml index ef543a4f75..e64e1a17f9 100644 --- a/.github/workflows/android-release.yml +++ b/.github/workflows/android-release.yml @@ -2,10 +2,11 @@ name: Release android app on: push: - branches: - - master - tags: - - 'v*' +# branches: +# - master +# todo dmitry release +# tags: +# - 'v*' jobs: build: name: Build @@ -150,6 +151,7 @@ jobs: path: | ${{steps.sign_app.outputs.signedReleaseFile}} +# todo dmitry fix before release # - name: Publish to Google Play Store # uses: r0adkll/upload-google-play@v1.1.0 # with: From 081598fb6b1032eb203c0486845a3751f4d41540 Mon Sep 17 00:00:00 2001 From: Dmitry Borodin Date: Wed, 12 Apr 2023 16:15:18 -0300 Subject: [PATCH 10/26] test workflow changes 2 --- .github/workflows/android-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/android-release.yml b/.github/workflows/android-release.yml index e64e1a17f9..bb8c87ff2c 100644 --- a/.github/workflows/android-release.yml +++ b/.github/workflows/android-release.yml @@ -1,7 +1,7 @@ name: Release android app on: - push: + push # branches: # - master # todo dmitry release From 5c24975cf81a8dfb43416efa0a15d4e8260dd155 Mon Sep 17 00:00:00 2001 From: Dmitry Borodin Date: Wed, 12 Apr 2023 16:22:40 -0300 Subject: [PATCH 11/26] workflow descriptions update --- .github/workflows/android-app.yml | 2 +- .github/workflows/android-release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/android-app.yml b/.github/workflows/android-app.yml index 86800d1111..7f2ad347ba 100644 --- a/.github/workflows/android-app.yml +++ b/.github/workflows/android-app.yml @@ -8,7 +8,7 @@ on: - stable jobs: build: - name: Build + name: Build android unit tests runs-on: ubuntu-22.04 steps: - name: Cancel Previous Runs diff --git a/.github/workflows/android-release.yml b/.github/workflows/android-release.yml index bb8c87ff2c..d81b6a5aa7 100644 --- a/.github/workflows/android-release.yml +++ b/.github/workflows/android-release.yml @@ -9,7 +9,7 @@ on: # - 'v*' jobs: build: - name: Build + name: Build android unit test runs-on: ubuntu-22.04 steps: - name: Cancel Previous Runs From d973340c8f09bb11110f52fda660557e4e69624f Mon Sep 17 00:00:00 2001 From: Dmitry Borodin Date: Wed, 12 Apr 2023 16:48:57 -0300 Subject: [PATCH 12/26] renamed jobs --- .github/workflows/android-release.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/android-release.yml b/.github/workflows/android-release.yml index d81b6a5aa7..f9499bc681 100644 --- a/.github/workflows/android-release.yml +++ b/.github/workflows/android-release.yml @@ -2,13 +2,14 @@ name: Release android app on: push +# push: # branches: # - master # todo dmitry release # tags: # - 'v*' jobs: - build: + tests: name: Build android unit test runs-on: ubuntu-22.04 steps: @@ -73,7 +74,7 @@ jobs: run: | ./gradlew :android:testDebugUnitTest - release: + build: name: Build signed APKs runs-on: ubuntu-22.04 # if: github.ref == ' refs/head/main' From 2226f166c6ca383cf3540d55529e1c0b1a886b36 Mon Sep 17 00:00:00 2001 From: Dmitry Borodin Date: Wed, 12 Apr 2023 16:53:23 -0300 Subject: [PATCH 13/26] unblock push to store step for test --- .github/workflows/android-release.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/android-release.yml b/.github/workflows/android-release.yml index f9499bc681..d7bd1b52a3 100644 --- a/.github/workflows/android-release.yml +++ b/.github/workflows/android-release.yml @@ -152,13 +152,12 @@ jobs: path: | ${{steps.sign_app.outputs.signedReleaseFile}} -# todo dmitry fix before release -# - name: Publish to Google Play Store -# uses: r0adkll/upload-google-play@v1.1.0 -# with: -# service_account_json: ${{ secrets.ANDROID_PLAY_STORE_API_JSON }} -# bundle_file: ${{steps.sign_app.outputs.signedReleaseFile}} -# track: 'internal' + - name: Publish to Google Play Store + uses: r0adkll/upload-google-play@v1.1.0 + with: + service_account_json: ${{ secrets.ANDROID_PLAY_STORE_API_JSON }} + bundle_file: ${{steps.sign_app.outputs.signedReleaseFile}} + track: 'internal' From 38d5a39a4d8b3fb1190944a23928c6b194d8b24d Mon Sep 17 00:00:00 2001 From: Dmitry Borodin Date: Wed, 12 Apr 2023 17:18:58 -0300 Subject: [PATCH 14/26] added cache back and jobs renamed --- .github/workflows/android-app.yml | 4 ++-- .github/workflows/android-release.yml | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/android-app.yml b/.github/workflows/android-app.yml index 7f2ad347ba..d2b3a70488 100644 --- a/.github/workflows/android-app.yml +++ b/.github/workflows/android-app.yml @@ -7,7 +7,7 @@ on: - master - stable jobs: - build: + tests: name: Build android unit tests runs-on: ubuntu-22.04 steps: @@ -72,7 +72,7 @@ jobs: run: | ./gradlew :android:testDebugUnitTest - debug: + build: name: Build unsigned APKs runs-on: ubuntu-22.04 # if: github.ref == ' refs/head/main' diff --git a/.github/workflows/android-release.yml b/.github/workflows/android-release.yml index d7bd1b52a3..6fda62b76d 100644 --- a/.github/workflows/android-release.yml +++ b/.github/workflows/android-release.yml @@ -127,6 +127,15 @@ jobs: with: workspaces: rust -> rust/target + - name: Gradle Cache + uses: actions/cache@v3 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- # Build and publish From 0d0a7f7e1423420e2afe8213193f2271555adbf7 Mon Sep 17 00:00:00 2001 From: Dmitry Borodin Date: Wed, 12 Apr 2023 17:39:33 -0300 Subject: [PATCH 15/26] publish to fix testing --- .github/workflows/android-release.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/android-release.yml b/.github/workflows/android-release.yml index 6fda62b76d..ca3232c57e 100644 --- a/.github/workflows/android-release.yml +++ b/.github/workflows/android-release.yml @@ -162,11 +162,12 @@ jobs: ${{steps.sign_app.outputs.signedReleaseFile}} - name: Publish to Google Play Store - uses: r0adkll/upload-google-play@v1.1.0 + uses: r0adkll/upload-google-play@v1.1.1 with: service_account_json: ${{ secrets.ANDROID_PLAY_STORE_API_JSON }} - bundle_file: ${{steps.sign_app.outputs.signedReleaseFile}} - track: 'internal' + releaseFiles: ${{steps.sign_app.outputs.signedReleaseFile}} + status: inProgress + track: internal From 1f958f4ed2b35ccf763a7d2c13c6163836010149 Mon Sep 17 00:00:00 2001 From: Dmitry Borodin Date: Wed, 12 Apr 2023 18:19:43 -0300 Subject: [PATCH 16/26] publish to fix 2 --- .github/workflows/android-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/android-release.yml b/.github/workflows/android-release.yml index ca3232c57e..23142cc39c 100644 --- a/.github/workflows/android-release.yml +++ b/.github/workflows/android-release.yml @@ -164,7 +164,7 @@ jobs: - name: Publish to Google Play Store uses: r0adkll/upload-google-play@v1.1.1 with: - service_account_json: ${{ secrets.ANDROID_PLAY_STORE_API_JSON }} + serviceAccountJson: ${{ secrets.ANDROID_PLAY_STORE_API_JSON }} releaseFiles: ${{steps.sign_app.outputs.signedReleaseFile}} status: inProgress track: internal From 644a9657fa995326826bc1a0afc7604955387069 Mon Sep 17 00:00:00 2001 From: Dmitry Borodin Date: Wed, 12 Apr 2023 20:36:46 -0300 Subject: [PATCH 17/26] publish to fix 3 --- .github/workflows/android-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/android-release.yml b/.github/workflows/android-release.yml index 23142cc39c..98b5ddb2b0 100644 --- a/.github/workflows/android-release.yml +++ b/.github/workflows/android-release.yml @@ -167,6 +167,7 @@ jobs: serviceAccountJson: ${{ secrets.ANDROID_PLAY_STORE_API_JSON }} releaseFiles: ${{steps.sign_app.outputs.signedReleaseFile}} status: inProgress + packageName: io.parity.signer track: internal From f5b2df7bb33e988d47fba7f364063194a853e7e3 Mon Sep 17 00:00:00 2001 From: Dmitry Borodin Date: Wed, 12 Apr 2023 21:45:16 -0300 Subject: [PATCH 18/26] publish to fix 4 --- .github/workflows/android-release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/android-release.yml b/.github/workflows/android-release.yml index 98b5ddb2b0..dacfa42fef 100644 --- a/.github/workflows/android-release.yml +++ b/.github/workflows/android-release.yml @@ -166,7 +166,6 @@ jobs: with: serviceAccountJson: ${{ secrets.ANDROID_PLAY_STORE_API_JSON }} releaseFiles: ${{steps.sign_app.outputs.signedReleaseFile}} - status: inProgress packageName: io.parity.signer track: internal From 28359d5d2f4d4ec0bb0c432ab70681db7bf127ce Mon Sep 17 00:00:00 2001 From: Dmitry Borodin Date: Wed, 12 Apr 2023 22:31:58 -0300 Subject: [PATCH 19/26] publish to fix 5 --- .github/workflows/android-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/android-release.yml b/.github/workflows/android-release.yml index dacfa42fef..d310684bfd 100644 --- a/.github/workflows/android-release.yml +++ b/.github/workflows/android-release.yml @@ -164,8 +164,8 @@ jobs: - name: Publish to Google Play Store uses: r0adkll/upload-google-play@v1.1.1 with: - serviceAccountJson: ${{ secrets.ANDROID_PLAY_STORE_API_JSON }} - releaseFiles: ${{steps.sign_app.outputs.signedReleaseFile}} + serviceAccountJsonPlainText: ${{ secrets.ANDROID_PLAY_STORE_API_JSON }} + releaseFiles: ${{ steps.sign_app.outputs.signedReleaseFile }} packageName: io.parity.signer track: internal From 7da8aebd8ea317535e04a132b83cdc6a8e483d97 Mon Sep 17 00:00:00 2001 From: Dmitry Borodin Date: Wed, 12 Apr 2023 23:13:07 -0300 Subject: [PATCH 20/26] version update to see if we can upload to play store --- android/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index a4abd928d4..1944d6ab58 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -12,8 +12,8 @@ android { applicationId "io.parity.signer" minSdk 23 targetSdk 33 - versionCode 60100 - versionName "6.1.0" + versionCode 60101 + versionName "6.1.0.upd" ndk { abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64' } From 6eef65a1261bd353bb1a714d54715307f0747f0a Mon Sep 17 00:00:00 2001 From: Dmitry Borodin Date: Thu, 13 Apr 2023 00:08:45 -0300 Subject: [PATCH 21/26] cleanup release flow after testing of release flow --- .github/workflows/android-release.yml | 12 +++++------- android/build.gradle | 4 ++-- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/android-release.yml b/.github/workflows/android-release.yml index d310684bfd..8dd6b1ffdf 100644 --- a/.github/workflows/android-release.yml +++ b/.github/workflows/android-release.yml @@ -1,13 +1,11 @@ name: Release android app on: - push -# push: -# branches: -# - master -# todo dmitry release -# tags: -# - 'v*' + push: + branches: + - master + tags: + - 'v*' jobs: tests: name: Build android unit test diff --git a/android/build.gradle b/android/build.gradle index 1944d6ab58..a4abd928d4 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -12,8 +12,8 @@ android { applicationId "io.parity.signer" minSdk 23 targetSdk 33 - versionCode 60101 - versionName "6.1.0.upd" + versionCode 60100 + versionName "6.1.0" ndk { abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64' } From ae107fafcd06eb72ce69f4278a34419e300c0cb0 Mon Sep 17 00:00:00 2001 From: Dmitry Borodin Date: Thu, 13 Apr 2023 00:16:05 -0300 Subject: [PATCH 22/26] readme updated about release --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 89852aa269..046512265e 100644 --- a/README.md +++ b/README.md @@ -168,6 +168,13 @@ Enable "Show package details" checkmark to select specific version. **10.** Run the project (`Ctrl+R`). It should build the Rust core library automatically. +# Release Android + +- Create PR with new app version updated and tag v* (example "v6.1.3") +- After merging to master release-android.yml flow should be triggered. It will build and sign apk and upload it to internal track in play store +- Create github release with apk from release flow +- Go to play store, promote internal track to production and update changes in play store + # Tests Core Rust code is fully covered by tests, and they run in CI on each commit. To run tests on your machine: From 06f507c9ec3632e6678b0a95e29883995971e287 Mon Sep 17 00:00:00 2001 From: Dmitry Borodin Date: Thu, 13 Apr 2023 12:35:51 -0300 Subject: [PATCH 23/26] review changes --- .github/workflows/android-app.yml | 5 +++-- .github/workflows/android-release.yml | 12 ++++-------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/android-app.yml b/.github/workflows/android-app.yml index d2b3a70488..fff549bdbe 100644 --- a/.github/workflows/android-app.yml +++ b/.github/workflows/android-app.yml @@ -7,7 +7,8 @@ on: - master - stable jobs: - tests: + #this it tests jobs, called build as it's required name for PR + build: name: Build android unit tests runs-on: ubuntu-22.04 steps: @@ -72,7 +73,7 @@ jobs: run: | ./gradlew :android:testDebugUnitTest - build: + makeapk: name: Build unsigned APKs runs-on: ubuntu-22.04 # if: github.ref == ' refs/head/main' diff --git a/.github/workflows/android-release.yml b/.github/workflows/android-release.yml index 8dd6b1ffdf..0f46c40daa 100644 --- a/.github/workflows/android-release.yml +++ b/.github/workflows/android-release.yml @@ -1,13 +1,10 @@ name: Release android app on: - push: - branches: - - master - tags: - - 'v*' + workflow_dispatch: jobs: - tests: + #it's tests but build job is required in our branch policies + build: name: Build android unit test runs-on: ubuntu-22.04 steps: @@ -72,7 +69,7 @@ jobs: run: | ./gradlew :android:testDebugUnitTest - build: + make: name: Build signed APKs runs-on: ubuntu-22.04 # if: github.ref == ' refs/head/main' @@ -89,7 +86,6 @@ jobs: submodules: 'recursive' - name: Install System Dependencies (Linux) - if: runner.os == 'Linux' run: | sudo apt-get update sudo apt-get install -y clang libclang-dev libopencv-dev From 9cc4481fba18be93c474ac6ab21879db2c766236 Mon Sep 17 00:00:00 2001 From: Dmitry Borodin Date: Thu, 13 Apr 2023 12:36:42 -0300 Subject: [PATCH 24/26] readme updated --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 046512265e..a46eae25f4 100644 --- a/README.md +++ b/README.md @@ -171,7 +171,7 @@ Enable "Show package details" checkmark to select specific version. # Release Android - Create PR with new app version updated and tag v* (example "v6.1.3") -- After merging to master release-android.yml flow should be triggered. It will build and sign apk and upload it to internal track in play store +- After merging to master - run release-android.yml flow. It will build and sign apk and upload it to internal track in play store - Create github release with apk from release flow - Go to play store, promote internal track to production and update changes in play store From ca2a4c62c25ecc789f21e7dbd98bddf0d9d915fd Mon Sep 17 00:00:00 2001 From: Dmitry Borodin Date: Thu, 13 Apr 2023 12:56:06 -0300 Subject: [PATCH 25/26] updated checkout action version as in other flows --- .github/workflows/android-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/android-release.yml b/.github/workflows/android-release.yml index 0f46c40daa..b73bd896f4 100644 --- a/.github/workflows/android-release.yml +++ b/.github/workflows/android-release.yml @@ -80,7 +80,7 @@ jobs: access_token: ${{ github.token }} - name: Checkout Sources - uses: actions/checkout@v3.5.0 + uses: actions/checkout@v3.5.1 with: fetch-depth: 50 submodules: 'recursive' From 96f8e21ef382436d2ada56a04cca196128fae381 Mon Sep 17 00:00:00 2001 From: Krzysztof Rodak Date: Thu, 13 Apr 2023 23:09:57 +0100 Subject: [PATCH 26/26] chore: update android existing CI flow --- .github/workflows/android-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/android-app.yml b/.github/workflows/android-app.yml index 079442f58e..350302bc1a 100644 --- a/.github/workflows/android-app.yml +++ b/.github/workflows/android-app.yml @@ -9,7 +9,7 @@ on: jobs: #this it tests jobs, called build as it's required name for PR build: - name: Build android unit tests + name: Build runs-on: ubuntu-22.04 steps: - name: Cancel Previous Runs