-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ignacio Santise
authored
Apr 9, 2024
1 parent
f1c9ac0
commit fd42217
Showing
4 changed files
with
128 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: CI Setup | ||
description: Setup Node.js and install dependencies | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Cache dependencies | ||
id: yarn-cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
**/node_modules | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Install dependencies | ||
if: steps.yarn-cache.outputs.cache-hit != 'true' | ||
run: | | ||
yarn install --immutable | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
on: | ||
workflow_call: | ||
inputs: | ||
name: | ||
description: 'Name of the project to be released' | ||
required: true | ||
type: string | ||
path: | ||
description: 'Path of the project to be released' | ||
required: true | ||
type: string | ||
type: | ||
description: 'Release type of the project (debug/internal/production)' | ||
default: 'internal' | ||
type: string | ||
output-path: | ||
description: 'Path to get the APK file' | ||
required: true | ||
type: string | ||
secrets: | ||
project-id: | ||
description: 'WalletConnect Cloud ID' | ||
required: true | ||
type: string | ||
firebase-app-id: | ||
required: true | ||
type: string | ||
firebase-token: | ||
required: true | ||
type: string | ||
relay-url: | ||
description: 'WalletConnect Relay URL' | ||
required: false | ||
type: string | ||
sentry-dns: | ||
required: true | ||
type: string | ||
sentry-file: | ||
required: true | ||
type: string | ||
secrets-file: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup | ||
uses: ./.github/actions/ci-setup | ||
|
||
- name: Cache Gradle | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- run: touch ${{ inputs.path }}/.env.${{ inputs.type }} && echo "ENV_PROJECT_ID=${{ secrets.project-id }}\nENV_RELAY_URL=${{ secrets.relay-url }}\nENV_SENTRY_DSN=${{ secrets.sentry-dns }}\nENV_SENTRY_TAG=${{ inputs.type }}" >> ${{ inputs.path }}/.env.${{ inputs.type }} | ||
- run: touch ${{ inputs.path }}/android/sentry.properties && echo "${{ secrets.sentry-file }}" >> ${{ inputs.path }}/android/sentry.properties | ||
- run: touch ${{ inputs.path }}/android/secrets.properties && echo "${{ secrets.secrets-file }}" >> ${{ inputs.path }}/android/secrets.properties | ||
|
||
- name: Build APK | ||
run: cd ${{ inputs.path }} && yarn install && yarn run android:build:internal | ||
|
||
- name: Setup Firebase | ||
uses: w9jds/setup-firebase@main | ||
with: | ||
tools-version: 13.0.1 | ||
firebase_token: ${{ secrets.firebase-token }} | ||
|
||
- name: Upload APK | ||
env: | ||
APP_ID: ${{ secrets.firebase-app-id }} | ||
run: | | ||
firebase appdistribution:distribute ./android/app/build/outputs/apk/${{ inputs.output-path }} --app $APP_ID --release-notes "${{ inputs.name }} ${{ inputs.type }} release" | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Release Web3Modal Android Internal | ||
on: workflow_dispatch | ||
|
||
jobs: | ||
release-internal: | ||
name: Release Web3Modal Android Internal | ||
uses: ./.github/workflows/release-android.yaml | ||
with: | ||
path: 'dapps/W3MWagmi' | ||
type: 'internal' | ||
output-path: 'dapps/W3MWagmi/android/app/build/outputs/apk/internal/app-internal.apk' | ||
secrets: | ||
project-id: ${{ secrets.ENV_PROJECT_ID }} | ||
sentry-dns: ${{ secrets.W3M_WAGMI_SENTRY_DSN }} | ||
sentry-file: ${{ secrets.W3M_WAGMI_SENTRY_FILE }} | ||
secrets-file: ${{ secrets.W3M_WAGMI_ANDROID_SECRETS }} | ||
firebase-token: ${{ secrets.FIREBASE_TOKEN }} | ||
firebase-app-id: ${{ secrets.W3M_WAGMI_ANDROID_INTERNAL_FIREBASE_APP_ID }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters