diff --git a/.github/keys/mosipgpgkey_pub.gpg b/.github/keys/mosipgpgkey_pub.gpg deleted file mode 100644 index 4bdb1a947b..0000000000 Binary files a/.github/keys/mosipgpgkey_pub.gpg and /dev/null differ diff --git a/.github/keys/mosipgpgkey_sec.gpg b/.github/keys/mosipgpgkey_sec.gpg deleted file mode 100644 index 97de55678f..0000000000 Binary files a/.github/keys/mosipgpgkey_sec.gpg and /dev/null differ diff --git a/.github/scripts/set-google-clientid.sh b/.github/scripts/set-google-clientid.sh new file mode 100755 index 0000000000..a5d6fb4cbc --- /dev/null +++ b/.github/scripts/set-google-clientid.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +flavor="$1" + +if [[ "$flavor" == "residentapp" ]]; then + echo "CLIENT_ID=INJI_GOOGLE_CLIENT_ID" >> $GITHUB_OUTPUT +elif [[ "$flavor" == "collab" ]]; then + echo "CLIENT_ID=COLLAB_ORG_KEY" >> $GITHUB_OUTPUT +elif [[ "$flavor" == "synergy" ]]; then + echo "CLIENT_ID=SYNERGY_ORG_KEY" >> $GITHUB_OUTPUT +elif [[ "$flavor" == "inji" ]]; then + echo "CLIENT_ID=INJI_ORG_KEY" >> $GITHUB_OUTPUT +elif [[ "$flavor" == "mec" ]]; then + echo "CLIENT_ID=MEC_ORG_KEY" >> $GITHUB_OUTPUT +else + echo "Error: Invalid flavor '$flavor'" + exit 1 +fi \ No newline at end of file diff --git a/.github/workflows/internal-build.yml b/.github/workflows/internal-build.yml index f1bb7f9d7d..c94be9cc45 100644 --- a/.github/workflows/internal-build.yml +++ b/.github/workflows/internal-build.yml @@ -81,8 +81,23 @@ on: - true jobs: + set-client-id: + runs-on: ubuntu-latest + outputs: + CLIENT_ID: ${{ steps.client-id.outputs.CLIENT_ID }} + steps: + - uses: actions/checkout@v3.1.0 + - name: Set Google client id + id: client-id + run: | + cd .github/scripts + ./set-google-clientid.sh "$INJI_FLAVOR" + env: + INJI_FLAVOR: ${{ github.event.inputs.injiFlavor }} + build-android: if: ${{ inputs.buildFor == 'Both[Android and IOS]' || inputs.buildFor == 'Android'}} + needs: set-client-id uses: mosip/kattu/.github/workflows/android-publish.yml@master with: RELEASE: ${{ inputs.release }} @@ -105,7 +120,7 @@ jobs: RELEASE_KEYSTORE_PASSWORD: '${{ secrets.INJI_ANDROID_RELEASE_STOREPASS }}' INJI_ANDROID_PLAY_STORE_CONFIG_JSON: ${{ secrets.INJI_ANDROID_PLAY_STORE_CONFIG_JSON }} SLACK_WEBHOOK_URL: '${{ secrets.SLACK_WEBHOOK_INJI_TEAM }}' - GOOGLE_ANDROID_CLIENT_ID: ${{secrets.INJI_GOOGLE_CLIENT_ID}} + GOOGLE_ANDROID_CLIENT_ID: ${{ secrets[needs.set-client-id.outputs.CLIENT_ID] }} build-android-beta: if: ${{ inputs.release == 'beta' && (inputs.buildFor == 'Both[Android and IOS]' || inputs.buildFor == 'Android') }}