From ec53629dad2778c6847504a0048fc7ab7e601526 Mon Sep 17 00:00:00 2001 From: ignaciosantise Date: Fri, 12 Apr 2024 17:30:33 -0300 Subject: [PATCH] chore: android wallet deploy action --- .github/workflows/release-android-base.yaml | 21 ++++++++++++++---- .../release-wallet-android-internal.yaml | 22 +++++++++++++++++++ 2 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/release-wallet-android-internal.yaml diff --git a/.github/workflows/release-android-base.yaml b/.github/workflows/release-android-base.yaml index fe2f75f6..98ad60da 100644 --- a/.github/workflows/release-android-base.yaml +++ b/.github/workflows/release-android-base.yaml @@ -40,6 +40,8 @@ on: required: true keystore: required: true + google-services-file: + required: false jobs: build: @@ -71,10 +73,21 @@ jobs: restore-keys: | ${{ runner.os }}-gradle- - - run: touch ${{ inputs.root-path }}/.env.${{ inputs.release-type }} && echo -e "ENV_PROJECT_ID=${{ secrets.project-id }}\nENV_RELAY_URL=${{ secrets.relay-url }}\nENV_SENTRY_DSN=${{ secrets.sentry-dsn }}\nENV_SENTRY_TAG=${{ inputs.release-type }}" >> ${{ inputs.root-path }}/.env.${{ inputs.release-type }} - - run: touch ${{ inputs.root-path }}/android/sentry.properties && echo "${{ secrets.sentry-file }}" >> ${{ inputs.root-path }}/android/sentry.properties - - run: touch ${{ inputs.root-path }}/android/secrets.properties && echo "${{ secrets.secrets-file }}" >> ${{ inputs.root-path }}/android/secrets.properties - - run: echo ${{ secrets.keystore }} | base64 --decode >> ${{ inputs.root-path }}/android/app/${{ secrets.keystore-name }}.keystore + - name: Create env file + run: touch ${{ inputs.root-path }}/.env.${{ inputs.release-type }} && echo -e "ENV_PROJECT_ID=${{ secrets.project-id }}\nENV_RELAY_URL=${{ secrets.relay-url }}\nENV_SENTRY_DSN=${{ secrets.sentry-dsn }}\nENV_SENTRY_TAG=${{ inputs.release-type }}" >> ${{ inputs.root-path }}/.env.${{ inputs.release-type }} + + - name: Add Sentry file + run: touch ${{ inputs.root-path }}/android/sentry.properties && echo "${{ secrets.sentry-file }}" >> ${{ inputs.root-path }}/android/sentry.properties + + - name: Add Secrets file + run: touch ${{ inputs.root-path }}/android/secrets.properties && echo "${{ secrets.secrets-file }}" >> ${{ inputs.root-path }}/android/secrets.properties + + - name: Add Keystore file + run: echo ${{ secrets.keystore }} | base64 --decode >> ${{ inputs.root-path }}/android/app/${{ secrets.keystore-name }}.keystore + + - name: Add Google Services file + if: secrets.google-services-file + run: touch ${{ inputs.root-path }}/android/app/google-services.json && echo ${{ secrets.google-services-file }} >> ${{ inputs.root-path }}/android/app/google-services.json - name: Build APK run: cd ${{ inputs.root-path }} && yarn install && yarn run android:build:internal diff --git a/.github/workflows/release-wallet-android-internal.yaml b/.github/workflows/release-wallet-android-internal.yaml new file mode 100644 index 00000000..7bef2c3a --- /dev/null +++ b/.github/workflows/release-wallet-android-internal.yaml @@ -0,0 +1,22 @@ +name: release-android-web3wallet-internal +on: workflow_dispatch + +jobs: + release-internal: + uses: ./.github/workflows/release-android-base.yaml + with: + name: Web3Wallet React Native + root-path: 'wallets/rn_cli_wallet' + release-type: 'internal' + output-path: 'wallets/rn_cli_wallet/android/app/build/outputs/apk/internal/app-internal.apk' + secrets: + project-id: ${{ secrets.ENV_PROJECT_ID }} + relay-url: ${{ secrets.ENV_RELAY_URL }} + sentry-dsn: ${{ secrets.W3W_SENTRY_DSN }} + sentry-file: ${{ secrets.W3W_SENTRY_FILE }} + secrets-file: ${{ secrets.ANDROID_SECRETS_FILE }} + firebase-app-id: ${{ secrets.W3W_ANDROID_INTERNAL_FIREBASE_APP_ID }} + gsa-key: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_KEY }} + keystore-name: ${{ secrets.WC_INTERNAL_KEYSTORE_NAME }} + keystore: ${{ secrets.WC_INTERNAL_KEYSTORE }} + google-services-file: ${{ secrets.ANDROID_GOOGLE_SERVICES_JSON }}