From d09694a2a877ce305da77b67f9842c7583f5e9a5 Mon Sep 17 00:00:00 2001 From: jackkray Date: Thu, 7 Nov 2024 14:43:36 +0100 Subject: [PATCH 1/4] feat:(bank-sdk) Add bank-sdk unique build PP-59 --- .../bank-sdk.alternative.version.artifact.yml | 52 +++++++++++++++++++ bank-sdk/example-app/build.gradle.kts | 8 +++ 2 files changed, 60 insertions(+) create mode 100644 .github/workflows/bank-sdk.alternative.version.artifact.yml diff --git a/.github/workflows/bank-sdk.alternative.version.artifact.yml b/.github/workflows/bank-sdk.alternative.version.artifact.yml new file mode 100644 index 0000000000..f34f9cc35c --- /dev/null +++ b/.github/workflows/bank-sdk.alternative.version.artifact.yml @@ -0,0 +1,52 @@ +name: Build Bank SDK alternative version + +on: + workflow_dispatch: + workflow_call: + secrets: + GINI_MOBILE_TEST_CLIENT_SECRET: + required: true + BANK_SDK_EXAMPLE_APP_KEYSTORE_PASSWORD: + required: true + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v4 + + - name: setup java + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '17' + cache: 'gradle' + + build-example-apps: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v4 + + - uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '17' + cache: 'gradle' + + - name: build release example app for QA + run: > + ./gradlew bank-sdk:example-app:assembleQaUniqueExampleAppRelease + -PclientId="gini-mobile-test" + -PclientSecret="${{ secrets.GINI_MOBILE_TEST_CLIENT_SECRET }}" + -PreleaseKeystoreFile="screen_api_example.jks" + -PreleaseKeystorePassword='${{ secrets.BANK_SDK_EXAMPLE_APP_KEYSTORE_PASSWORD }}' + -PreleaseKeyAlias="screen_api_example" + -PreleaseKeyPassword='${{ secrets.BANK_SDK_EXAMPLE_APP_KEYSTORE_PASSWORD }}' + + - name: archive release example app for QA + uses: actions/upload-artifact@v4 + with: + name: bank-sdk-example-app-qa-release + path: bank-sdk/example-app/build/outputs/apk/qaUniqueExampleApp/release \ No newline at end of file diff --git a/bank-sdk/example-app/build.gradle.kts b/bank-sdk/example-app/build.gradle.kts index 2b78d820f7..24aa72f256 100644 --- a/bank-sdk/example-app/build.gradle.kts +++ b/bank-sdk/example-app/build.gradle.kts @@ -114,9 +114,17 @@ android { create("dev") { isDefault = true dimension = "environment" + applicationIdSuffix = ".qa" } create("qa") { dimension = "environment" + + applicationIdSuffix = ".qa" + } + create("qaUnique"){ + dimension = "environment" + val v = project(":bank-sdk:sdk").project.version.toString().replace(".", "_") + applicationIdSuffix = ".qa$v" } create("exampleApp") { isDefault = true From 3c92e6b694587d206b5e009debad0f166000423c Mon Sep 17 00:00:00 2001 From: jackkray Date: Tue, 10 Dec 2024 15:45:51 +0100 Subject: [PATCH 2/4] feat:(health-sdk) Unique build for health example app PP-59 --- .../bank-sdk.alternative.version.artifact.yml | 18 ++------- .../health-sdk.alternative.version.check.yml | 40 +++++++++++++++++++ ...chant-sdk.alternative.version.artifact.yml | 40 +++++++++++++++++++ bank-sdk/example-app/build.gradle.kts | 3 -- health-sdk/example-app/build.gradle.kts | 5 +++ merchant-sdk/example-app/build.gradle.kts | 5 +++ 6 files changed, 93 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/health-sdk.alternative.version.check.yml create mode 100644 .github/workflows/merchant-sdk.alternative.version.artifact.yml diff --git a/.github/workflows/bank-sdk.alternative.version.artifact.yml b/.github/workflows/bank-sdk.alternative.version.artifact.yml index f34f9cc35c..caf60d212a 100644 --- a/.github/workflows/bank-sdk.alternative.version.artifact.yml +++ b/.github/workflows/bank-sdk.alternative.version.artifact.yml @@ -1,6 +1,7 @@ name: Build Bank SDK alternative version on: + push: workflow_dispatch: workflow_call: secrets: @@ -10,19 +11,6 @@ on: required: true jobs: - test: - runs-on: ubuntu-latest - steps: - - name: checkout - uses: actions/checkout@v4 - - - name: setup java - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: '17' - cache: 'gradle' - build-example-apps: runs-on: ubuntu-latest steps: @@ -35,7 +23,7 @@ jobs: java-version: '17' cache: 'gradle' - - name: build release example app for QA + - name: build unique release example app for QA run: > ./gradlew bank-sdk:example-app:assembleQaUniqueExampleAppRelease -PclientId="gini-mobile-test" @@ -45,7 +33,7 @@ jobs: -PreleaseKeyAlias="screen_api_example" -PreleaseKeyPassword='${{ secrets.BANK_SDK_EXAMPLE_APP_KEYSTORE_PASSWORD }}' - - name: archive release example app for QA + - name: archive unique release example app for QA uses: actions/upload-artifact@v4 with: name: bank-sdk-example-app-qa-release diff --git a/.github/workflows/health-sdk.alternative.version.check.yml b/.github/workflows/health-sdk.alternative.version.check.yml new file mode 100644 index 0000000000..c2b221f54d --- /dev/null +++ b/.github/workflows/health-sdk.alternative.version.check.yml @@ -0,0 +1,40 @@ +name: Build Health SDK alternative version + +on: + push: + workflow_dispatch: + workflow_call: + secrets: + GINI_MOBILE_TEST_CLIENT_SECRET: + required: true + HEALTH_SDK_EXAMPLE_APP_KEYSTORE_PASSWORD: + required: true + +jobs: + build-example-app: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v4 + + - uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '17' + cache: 'gradle' + + - name: build unique release example app for QA + run: > + ./gradlew health-sdk:example-app:assembleUniqueQaRelease + -PclientId="gini-mobile-test" + -PclientSecret="${{ secrets.GINI_MOBILE_TEST_CLIENT_SECRET }}" + -PreleaseKeystoreFile="health_sdk_example.jks" + -PreleaseKeystorePassword='${{ secrets.HEALTH_SDK_EXAMPLE_APP_KEYSTORE_PASSWORD }}' + -PreleaseKeyAlias="health_sdk_example" + -PreleaseKeyPassword='${{ secrets.HEALTH_SDK_EXAMPLE_APP_KEYSTORE_PASSWORD }}' + + - name: archive unique release example app for QA + uses: actions/upload-artifact@v4 + with: + name: health-sdk-example-app-qaUnique-release + path: health-sdk/example-app/build/outputs/apk/qaUnique/release diff --git a/.github/workflows/merchant-sdk.alternative.version.artifact.yml b/.github/workflows/merchant-sdk.alternative.version.artifact.yml new file mode 100644 index 0000000000..48eaad485f --- /dev/null +++ b/.github/workflows/merchant-sdk.alternative.version.artifact.yml @@ -0,0 +1,40 @@ +name: Check Merchant SDK alternative version + +on: + push: + workflow_dispatch: + workflow_call: + secrets: + GINI_MOBILE_TEST_CLIENT_SECRET: + required: true + MERCHANT_SDK_EXAMPLE_APP_KEYSTORE_PASSWORD: + required: true + +jobs: + build-example-app: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v4 + + - uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '17' + cache: 'gradle' + + - name: build release example app for QA + run: > + ./gradlew merchant-sdk:example-app:assembleQaRelease + -PclientId="gini-mobile-test" + -PclientSecret="${{ secrets.GINI_MOBILE_TEST_CLIENT_SECRET }}" + -PreleaseKeystoreFile="merchant_sdk_example.jks" + -PreleaseKeystorePassword='${{ secrets.MERCHANT_SDK_EXAMPLE_APP_KEYSTORE_PASSWORD }}' + -PreleaseKeyAlias="merchant_sdk_example" + -PreleaseKeyPassword='${{ secrets.MERCHANT_SDK_EXAMPLE_APP_KEYSTORE_PASSWORD }}' + + - name: archive release example app for QA + uses: actions/upload-artifact@v4 + with: + name: merchant-sdk-example-app-qaUnique-release + path: merchant-sdk/example-app/build/outputs/apk/qaUnique/release \ No newline at end of file diff --git a/bank-sdk/example-app/build.gradle.kts b/bank-sdk/example-app/build.gradle.kts index 24aa72f256..864c047f1b 100644 --- a/bank-sdk/example-app/build.gradle.kts +++ b/bank-sdk/example-app/build.gradle.kts @@ -114,12 +114,9 @@ android { create("dev") { isDefault = true dimension = "environment" - applicationIdSuffix = ".qa" } create("qa") { dimension = "environment" - - applicationIdSuffix = ".qa" } create("qaUnique"){ dimension = "environment" diff --git a/health-sdk/example-app/build.gradle.kts b/health-sdk/example-app/build.gradle.kts index 5f24fab41a..89e048e577 100644 --- a/health-sdk/example-app/build.gradle.kts +++ b/health-sdk/example-app/build.gradle.kts @@ -59,6 +59,11 @@ android { create("qa") { dimension = "environment" } + create("qaUnique"){ + dimension = "environment" + val v = project(":health-sdk:sdk").project.version.toString().replace(".", "_") + applicationIdSuffix = ".qa$v" + } } buildFeatures { viewBinding = true diff --git a/merchant-sdk/example-app/build.gradle.kts b/merchant-sdk/example-app/build.gradle.kts index f7ad42a67e..800f704048 100644 --- a/merchant-sdk/example-app/build.gradle.kts +++ b/merchant-sdk/example-app/build.gradle.kts @@ -59,6 +59,11 @@ android { create("qa") { dimension = "environment" } + create("qaUnique"){ + dimension = "environment" + val v = project(":health-sdk:sdk").project.version.toString().replace(".", "_") + applicationIdSuffix = ".qa$v" + } } buildFeatures { viewBinding = true From 83c0f01fdcc5a4721e61065738d523d22b3ea6e7 Mon Sep 17 00:00:00 2001 From: jackkray Date: Wed, 11 Dec 2024 15:24:22 +0100 Subject: [PATCH 3/4] feat:(merchant-sdk) Add unique build for merchant example app PP-59 --- .github/workflows/health-sdk.alternative.version.check.yml | 2 +- .github/workflows/merchant-sdk.alternative.version.artifact.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/health-sdk.alternative.version.check.yml b/.github/workflows/health-sdk.alternative.version.check.yml index c2b221f54d..f58388a670 100644 --- a/.github/workflows/health-sdk.alternative.version.check.yml +++ b/.github/workflows/health-sdk.alternative.version.check.yml @@ -25,7 +25,7 @@ jobs: - name: build unique release example app for QA run: > - ./gradlew health-sdk:example-app:assembleUniqueQaRelease + ./gradlew health-sdk:example-app:assembleQaUniqueRelease -PclientId="gini-mobile-test" -PclientSecret="${{ secrets.GINI_MOBILE_TEST_CLIENT_SECRET }}" -PreleaseKeystoreFile="health_sdk_example.jks" diff --git a/.github/workflows/merchant-sdk.alternative.version.artifact.yml b/.github/workflows/merchant-sdk.alternative.version.artifact.yml index 48eaad485f..0955adeaa1 100644 --- a/.github/workflows/merchant-sdk.alternative.version.artifact.yml +++ b/.github/workflows/merchant-sdk.alternative.version.artifact.yml @@ -25,7 +25,7 @@ jobs: - name: build release example app for QA run: > - ./gradlew merchant-sdk:example-app:assembleQaRelease + ./gradlew merchant-sdk:example-app:assembleQaUniqueRelease -PclientId="gini-mobile-test" -PclientSecret="${{ secrets.GINI_MOBILE_TEST_CLIENT_SECRET }}" -PreleaseKeystoreFile="merchant_sdk_example.jks" From b8d16cc07ca635c3b2e2567a0ff4ebdf22c93f84 Mon Sep 17 00:00:00 2001 From: jackkray Date: Thu, 12 Dec 2024 11:51:53 +0100 Subject: [PATCH 4/4] ci: Remove push trigger PP-59 --- .github/workflows/bank-sdk.alternative.version.artifact.yml | 1 - .github/workflows/health-sdk.alternative.version.check.yml | 1 - .github/workflows/merchant-sdk.alternative.version.artifact.yml | 1 - 3 files changed, 3 deletions(-) diff --git a/.github/workflows/bank-sdk.alternative.version.artifact.yml b/.github/workflows/bank-sdk.alternative.version.artifact.yml index caf60d212a..be265fc6d3 100644 --- a/.github/workflows/bank-sdk.alternative.version.artifact.yml +++ b/.github/workflows/bank-sdk.alternative.version.artifact.yml @@ -1,7 +1,6 @@ name: Build Bank SDK alternative version on: - push: workflow_dispatch: workflow_call: secrets: diff --git a/.github/workflows/health-sdk.alternative.version.check.yml b/.github/workflows/health-sdk.alternative.version.check.yml index f58388a670..d4674ce902 100644 --- a/.github/workflows/health-sdk.alternative.version.check.yml +++ b/.github/workflows/health-sdk.alternative.version.check.yml @@ -1,7 +1,6 @@ name: Build Health SDK alternative version on: - push: workflow_dispatch: workflow_call: secrets: diff --git a/.github/workflows/merchant-sdk.alternative.version.artifact.yml b/.github/workflows/merchant-sdk.alternative.version.artifact.yml index 0955adeaa1..b1ab3f4054 100644 --- a/.github/workflows/merchant-sdk.alternative.version.artifact.yml +++ b/.github/workflows/merchant-sdk.alternative.version.artifact.yml @@ -1,7 +1,6 @@ name: Check Merchant SDK alternative version on: - push: workflow_dispatch: workflow_call: secrets: