Skip to content

Commit

Permalink
Merge pull request #47 from reown-com/develop
Browse files Browse the repository at this point in the history
AppKit 1.2.0
  • Loading branch information
quetool authored Nov 27, 2024
2 parents c4256b7 + 86d6700 commit 227b7a0
Show file tree
Hide file tree
Showing 230 changed files with 8,812 additions and 3,650 deletions.
12 changes: 11 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,44 @@ assignees: ''
---

**Describe the bug**

A clear and concise description of what the bug is.

**To Reproduce**

Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**

A clear and concise description of what you expected to happen.

**Reproducible code**
If applicable, add a minimum reproducible code snippet.

If applicable, add a minimum reproducible code snippet.
A minimum reproducible code should have only Reown's SDK as dependency (besides flutter sdk of course)
There is no point you copy/paste your code if we can't run it as it is on our side.

**Screenshots**

If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**

Add any other context about the problem here.
5 changes: 5 additions & 0 deletions .github/workflows/release_dapp_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:
types:
- closed

# inputs:
# working-directory
# flavor
# BUNDLE_ID

jobs:
build:
if: (github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'master') || github.event_name == 'workflow_dispatch'
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/release_dapp_android_internal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:
types:
- closed

# inputs:
# working-directory
# flavor
# BUNDLE_ID

jobs:
build:
if: (github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'develop') || github.event_name == 'workflow_dispatch'
Expand Down
54 changes: 29 additions & 25 deletions .github/workflows/release_modal_android.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Android App Release
name: Android Modal (production) deploy

on:
workflow_dispatch:
Expand All @@ -11,12 +11,14 @@ on:
jobs:
build_with_signing:
name: Build Android App Release
runs-on: macos-latest
runs-on: macos-latest-xlarge

steps:
# Checkout the repo
- name: Checkout repository
uses: actions/checkout@v4

# Create temp firebase key
- name: Create temp firebase key
env:
FIREBASE_KEY_BASE64: ${{ secrets.FIREBASE_KEY_BASE64 }}
Expand All @@ -26,6 +28,7 @@ jobs:
# import certificate and provisioning profile from secrets
echo -n "$FIREBASE_KEY_BASE64" | base64 --decode -o $FIREBASE_KEY_PATH
# Setup Java 11
- name: Setup Java 17
uses: actions/setup-java@v3
Expand All @@ -34,6 +37,8 @@ jobs:
java-version: '17'
architecture: x86_64
cache: 'gradle'

# Cache Gradle
- name: Cache Gradle
uses: actions/cache@v3
with:
Expand All @@ -43,36 +48,26 @@ jobs:
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
# Install Flutter SDK
- name: Install Flutter
uses: subosito/flutter-action@v2
# Install Flutter and Dependencies
- uses: ./.github/actions/dependencies
with:
flutter-version: '3.19.5'
# Get package dependencies and generate files
- name: Get package dependencies and generate files
run: |
flutter pub get
flutter pub run build_runner build --delete-conflicting-outputs
# Get example app dependencies and generate files
- name: Get example app dependencies and generate files
working-directory: example
run: |
flutter pub get
flutter pub run build_runner build --delete-conflicting-outputs
working-directory: packages/reown_appkit/example/modal

# Build Android example app
- name: Build Android APK
working-directory: example
working-directory: packages/reown_appkit/example/modal
env:
PROJECT_ID: ${{ secrets.PROJECT_ID }}
APPKIT_AUTH: ${{ secrets.APPKIT_AUTH }}
APPKIT_PROJECT_ID: ${{ secrets.APPKIT_PROJECT_ID }}
AUTH_SERVICE_URL: ${{ secrets.AUTH_SERVICE_URL }}
run: |
# Get app version from file
# VERSION_FILE=$GITHUB_WORKSPACE/lib/version.dart
# VERSION=`echo $(cat $VERSION_FILE) | sed "s/[^']*'\([^']*\)'.*/\1/"`
VERSION=4.0.0
GRADLE_FILE=android/gradle.properties
VERSION_FILE=$GITHUB_WORKSPACE/lib/version.dart
VERSION=`echo $(cat $VERSION_FILE) | sed "s/[^']*'\([^']*\)'.*/\1/"`
# Set versionName on gradle.properties
awk -F"=" -v newval="$VERSION" 'BEGIN{OFS=FS} $1=="versionName"{$2=newval}1' $GRADLE_FILE > "$GRADLE_FILE.tmp" && mv "$GRADLE_FILE.tmp" $GRADLE_FILE
Expand All @@ -89,18 +84,23 @@ jobs:
# Setup Node
- name: Setup Node
uses: actions/setup-node@v3

# Setup Firebase
- name: Setup Firebase
uses: w9jds/setup-firebase@main
with:
tools-version: 13.0.1
firebase_token: ${{ secrets.FIREBASE_TOKEN }}

# Upload APK
- name: Upload APK
working-directory: example/build/app/outputs/flutter-apk
working-directory: packages/reown_appkit/example/modal/build/app/outputs/flutter-apk
env:
APP_ID: ${{ secrets.ANDROID_APP_ID }}
run: |
firebase appdistribution:distribute app-stable-release.apk --app $APP_ID --release-notes "Web3Modal Flutter stable release" --groups "flutter-team, javascript-team, kotlin-team"
firebase appdistribution:distribute app-stable-release.apk --app $APP_ID --release-notes "AppKit Flutter sample production" --groups "flutter-team, javascript-team, kotlin-team"
# Notify Channel
- name: Notify Channel
uses: slackapi/slack-github-action@v1.24.0
env:
Expand All @@ -109,7 +109,7 @@ jobs:
with:
payload: |-
{
"text":"🤖 New *Android* build *${{ github.ref_name }}* stable version for *Web3Modal Flutter* was just deployed. Test at https://appdistribution.firebase.dev/i/a8efff56e3f0fdb0"
"text":"🤖 AppKit *Modal* Flutter Sample *${{ github.ref_name }}* was just deployed. Test at https://appdistribution.firebase.dev/i/a8efff56e3f0fdb0"
}
# Clean up Flutter envs
Expand All @@ -119,4 +119,8 @@ jobs:
rm $RUNNER_TEMP/flutter-c7c2c-6df892fe6ddb.json
flutter clean
cd example
flutter clean
flutter clean
# Launch locally
# Needs docker to be running
# act -j build_with_signing --container-architecture linux/amd64 -P macos-latest-xlarge=-self-hosted --secret-file .github/workflows/.env.secret.modal -W .github/workflows/release_modal_android.yml
55 changes: 30 additions & 25 deletions .github/workflows/release_modal_android_internal.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Android App Internal (beta)
name: Android Modal (internal) deploy

on:
workflow_dispatch:
Expand All @@ -11,12 +11,14 @@ on:
jobs:
build_with_signing:
name: Build Android App Internal (beta)
runs-on: macos-latest
runs-on: macos-latest-xlarge

steps:
# Checkout the repo
- name: Checkout repository
uses: actions/checkout@v4

# Create temp firebase key
- name: Create temp firebase key
env:
FIREBASE_KEY_BASE64: ${{ secrets.FIREBASE_KEY_BASE64 }}
Expand All @@ -26,6 +28,7 @@ jobs:
# import certificate and provisioning profile from secrets
echo -n "$FIREBASE_KEY_BASE64" | base64 --decode -o $FIREBASE_KEY_PATH
# Setup Java 11
- name: Setup Java 17
uses: actions/setup-java@v3
Expand All @@ -34,6 +37,8 @@ jobs:
java-version: '17'
architecture: x86_64
cache: 'gradle'

# Cache Gradle
- name: Cache Gradle
uses: actions/cache@v3
with:
Expand All @@ -43,36 +48,26 @@ jobs:
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
# Install Flutter SDK
- name: Install Flutter
uses: subosito/flutter-action@v2
# Install Flutter and Dependencies
- uses: ./.github/actions/dependencies
with:
flutter-version: '3.19.5'
# Get package dependencies and generate files
- name: Get package dependencies and generate files
run: |
flutter pub get
flutter pub run build_runner build --delete-conflicting-outputs
# Get example app dependencies and generate files
- name: Get example app dependencies and generate files
working-directory: example
run: |
flutter pub get
flutter pub run build_runner build --delete-conflicting-outputs
working-directory: packages/reown_appkit/example/modal

# Build Android example app
- name: Build Android APK
working-directory: example
working-directory: packages/reown_appkit/example/modal
env:
PROJECT_ID: ${{ secrets.PROJECT_ID }}
APPKIT_AUTH: ${{ secrets.APPKIT_AUTH }}
APPKIT_PROJECT_ID: ${{ secrets.APPKIT_PROJECT_ID }}
AUTH_SERVICE_URL: ${{ secrets.AUTH_SERVICE_URL }}
run: |
# Get app version from file
# VERSION_FILE=$GITHUB_WORKSPACE/lib/version.dart
# VERSION=`echo $(cat $VERSION_FILE) | sed "s/[^']*'\([^']*\)'.*/\1/"`
VERSION=4.0.0
GRADLE_FILE=android/gradle.properties
VERSION_FILE=$GITHUB_WORKSPACE/lib/version.dart
VERSION=`echo $(cat $VERSION_FILE) | sed "s/[^']*'\([^']*\)'.*/\1/"`
# Set versionName on gradle.properties
awk -F"=" -v newval="$VERSION" 'BEGIN{OFS=FS} $1=="versionName"{$2=newval}1' $GRADLE_FILE > "$GRADLE_FILE.tmp" && mv "$GRADLE_FILE.tmp" $GRADLE_FILE
Expand All @@ -89,18 +84,23 @@ jobs:
# Setup Node
- name: Setup Node
uses: actions/setup-node@v3

# Setup Firebase
- name: Setup Firebase
uses: w9jds/setup-firebase@main
with:
tools-version: 13.0.1
firebase_token: ${{ secrets.FIREBASE_TOKEN }}

# Upload APK
- name: Upload APK
working-directory: example/build/app/outputs/flutter-apk
working-directory: packages/reown_appkit/example/modal/build/app/outputs/flutter-apk
env:
APP_ID: ${{ secrets.ANDROID_APP_ID_INTERNAL }}
run: |
firebase appdistribution:distribute app-beta-release.apk --app $APP_ID --release-notes "Web3Modal Flutter beta release" --groups "flutter-team, javascript-team, kotlin-team"
firebase appdistribution:distribute app-beta-release.apk --app $APP_ID --release-notes "AppKit Flutter sample internal" --groups "flutter-team, javascript-team, kotlin-team"
# Notify Channel
- name: Notify Channel
uses: slackapi/slack-github-action@v1.24.0
env:
Expand All @@ -109,13 +109,18 @@ jobs:
with:
payload: |-
{
"text":"🤖 New *Android* build *${{ github.ref_name }}* version for *Web3Modal Flutter* was just deployed. Test at https://appdistribution.firebase.dev/i/a47ee97e86fbdfff"
"text":"🤖 AppKit *Modal* Flutter Sample *Internal* *${{ github.ref_name }}* was just deployed. Test at https://appdistribution.firebase.dev/i/a47ee97e86fbdfff"
}
# Clean up Flutter envs
- name: Clean up
if: ${{ always() }}
run: |
rm $RUNNER_TEMP/flutter-c7c2c-6df892fe6ddb.json
flutter clean
cd example
flutter clean
flutter clean
# Launch locally
# Needs docker to be running
# act -j build_with_signing --container-architecture linux/amd64 -P macos-latest-xlarge=-self-hosted --secret-file .github/workflows/.env.secret.modal -W .github/workflows/release_modal_android_internal.yml
Loading

0 comments on commit 227b7a0

Please sign in to comment.