Skip to content

Commit

Permalink
chore: android wallet deploy action
Browse files Browse the repository at this point in the history
  • Loading branch information
ignaciosantise committed Apr 12, 2024
1 parent fdae193 commit ec53629
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 4 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/release-android-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ on:
required: true
keystore:
required: true
google-services-file:
required: false

jobs:
build:
Expand Down Expand Up @@ -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
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/release-wallet-android-internal.yaml
Original file line number Diff line number Diff line change
@@ -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 }}

0 comments on commit ec53629

Please sign in to comment.