-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from reown-com/develop
AppKit 1.2.0
- Loading branch information
Showing
230 changed files
with
8,812 additions
and
3,650 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
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
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Build Android App Release | ||
name: Android Modal (production) deploy | ||
|
||
on: | ||
workflow_dispatch: | ||
|
@@ -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 }} | ||
|
@@ -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 | ||
|
@@ -34,6 +37,8 @@ jobs: | |
java-version: '17' | ||
architecture: x86_64 | ||
cache: 'gradle' | ||
|
||
# Cache Gradle | ||
- name: Cache Gradle | ||
uses: actions/cache@v3 | ||
with: | ||
|
@@ -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 | ||
|
@@ -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/[email protected] | ||
env: | ||
|
@@ -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 | ||
|
@@ -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 |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Build Android App Internal (beta) | ||
name: Android Modal (internal) deploy | ||
|
||
on: | ||
workflow_dispatch: | ||
|
@@ -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 }} | ||
|
@@ -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 | ||
|
@@ -34,6 +37,8 @@ jobs: | |
java-version: '17' | ||
architecture: x86_64 | ||
cache: 'gradle' | ||
|
||
# Cache Gradle | ||
- name: Cache Gradle | ||
uses: actions/cache@v3 | ||
with: | ||
|
@@ -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 | ||
|
@@ -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/[email protected] | ||
env: | ||
|
@@ -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 |
Oops, something went wrong.