diff --git a/.github/workflows/release_dapp_android.yml b/.github/workflows/release_dapp_android.yml index aa2edee6..ce5293c6 100644 --- a/.github/workflows/release_dapp_android.yml +++ b/.github/workflows/release_dapp_android.yml @@ -1,4 +1,4 @@ -name: Android Web3Dapp deploy +name: Android Web3Dapp (production) deploy on: workflow_dispatch: @@ -8,7 +8,7 @@ on: jobs: build: - if: github.event.pull_request.merged == true + if: (github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'master') || github.event_name == 'workflow_dispatch' runs-on: macos-latest-xlarge steps: @@ -43,10 +43,12 @@ jobs: - name: Fastlane working-directory: example/dapp/android env: + FLAVOR: "production" PROJECT_ID: ${{ secrets.DAPP_PROJECT_ID }} SLACK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} FIREBASE_DAPP_ID: ${{ secrets.FIREBASE_DAPP_ID }} + DOWNLOAD_URL: ${{ secrets.DOWNLOAD_URL_DAPP }} run: | PUBSPEC_FILE=../../../pubspec.yaml FILE_VALUE=$(echo | grep "^version: " $PUBSPEC_FILE) diff --git a/.github/workflows/release_dapp_android_internal.yml b/.github/workflows/release_dapp_android_internal.yml new file mode 100644 index 00000000..d8570a0b --- /dev/null +++ b/.github/workflows/release_dapp_android_internal.yml @@ -0,0 +1,63 @@ +name: Android Web3Dapp (internal) deploy + +on: + workflow_dispatch: + pull_request: + types: + - closed + +jobs: + build: + if: (github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'develop') || github.event_name == 'workflow_dispatch' + runs-on: macos-latest-xlarge + + steps: + # Checkout the repo + - name: Checkout repository + uses: actions/checkout@v4 + + # Install Java 17 + - name: Install Java 17 + uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: '17' + architecture: x86_64 + cache: 'gradle' + + # Cache Gradle + - 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- + + # Install Flutter and Dependencies + - uses: ./.github/actions/dependencies + + # Fastlane + - name: Fastlane + working-directory: example/dapp/android + env: + FLAVOR: "internal" + PROJECT_ID: ${{ secrets.DAPP_PROJECT_ID }} + SLACK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} + FIREBASE_DAPP_ID: ${{ secrets.FIREBASE_DAPP_ID_INTERNAL }} + DOWNLOAD_URL: ${{ secrets.DOWNLOAD_URL_DAPP_INTERNAL }} + run: | + PUBSPEC_FILE=../../../pubspec.yaml + FILE_VALUE=$(echo | grep "^version: " $PUBSPEC_FILE) + PARTS=(${FILE_VALUE//:/ }) + FULL_VERSION=${PARTS[1]} + VERSION_NUMBER=(${FULL_VERSION//-/ }) + + fastlane add_plugin firebase_app_distribution + fastlane release_firebase project_id:$PROJECT_ID app_version:$VERSION_NUMBER + +# Launch locally +# act -j build --container-architecture linux/amd64 -P macos-latest-xlarge=-self-hosted --secret-file .github/workflows/.env.secret -W .github/workflows/release_dapp_android.yml diff --git a/.github/workflows/release_dapp_ios.yml b/.github/workflows/release_dapp_ios.yml index f0125036..a346fe4a 100644 --- a/.github/workflows/release_dapp_ios.yml +++ b/.github/workflows/release_dapp_ios.yml @@ -1,4 +1,4 @@ -name: iOS Web3Dapp deploy +name: iOS Web3Dapp (production) deploy on: workflow_dispatch: @@ -8,7 +8,7 @@ on: jobs: build: - if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch' + if: (github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'master') || github.event_name == 'workflow_dispatch' runs-on: macos-latest-xlarge steps: @@ -43,13 +43,13 @@ jobs: FULL_VERSION=${PARTS[1]} VERSION_NUMBER=(${FULL_VERSION//-/ }) - # flutter build ipa --build-name $VERSION_NUMBER --dart-define="PROJECT_ID=$PROJECT_ID" --release - flutter build ios --build-name $VERSION_NUMBER --dart-define="PROJECT_ID=$PROJECT_ID" --config-only --release + flutter build ios --flavor production --build-name $VERSION_NUMBER --dart-define="PROJECT_ID=$PROJECT_ID" --config-only --release # Fastlane - name: Fastlane working-directory: example/dapp/ios env: + BUNDLE_ID: "com.walletconnect.flutterdapp" APPLE_ID: ${{ secrets.APPLE_ID }} APPLE_DAPP_ID: ${{ secrets.APPLE_DAPP_ID }} PROJECT_ID: ${{ secrets.DAPP_PROJECT_ID }} @@ -60,6 +60,7 @@ jobs: APP_STORE_CONNECT_KEY: ${{ secrets.APP_STORE_CONNECT_KEY }} MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }} SLACK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + TESTFLIGHT_URL: ${{ secrets.TESTFLIGHT_URL_DAPP }} run: | PUBSPEC_FILE=../../../pubspec.yaml FILE_VALUE=$(echo | grep "^version: " $PUBSPEC_FILE) @@ -67,7 +68,7 @@ jobs: FULL_VERSION=${PARTS[1]} VERSION_NUMBER=(${FULL_VERSION//-/ }) - fastlane release_testflight username:$APPLE_ID token:$GH_BASIC_AUTH project_id:$PROJECT_ID app_id:$APPLE_DAPP_ID app_store_key_id:$APP_STORE_KEY_ID apple_issuer_id:$APPLE_ISSUER_ID app_store_connect_key:"$APP_STORE_CONNECT_KEY" match_git_url:$MATCH_GIT_URL app_version:$VERSION_NUMBER + fastlane release_testflight username:$APPLE_ID token:$GH_BASIC_AUTH project_id:$PROJECT_ID app_id:$APPLE_DAPP_ID app_store_key_id:$APP_STORE_KEY_ID apple_issuer_id:$APPLE_ISSUER_ID app_store_connect_key:"$APP_STORE_CONNECT_KEY" match_git_url:$MATCH_GIT_URL app_version:$VERSION_NUMBER flavor:production # Launch locally # act -j build --container-architecture linux/amd64 -P macos-latest-xlarge=-self-hosted --secret-file .github/workflows/.env.secret -W .github/workflows/release_dapp_ios.yml diff --git a/.github/workflows/release_dapp_ios_internal.yml b/.github/workflows/release_dapp_ios_internal.yml new file mode 100644 index 00000000..54911c49 --- /dev/null +++ b/.github/workflows/release_dapp_ios_internal.yml @@ -0,0 +1,74 @@ +name: iOS Web3Dapp (internal) deploy + +on: + workflow_dispatch: + pull_request: + types: + - closed + +jobs: + build: + if: (github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'develop') || github.event_name == 'workflow_dispatch' + runs-on: macos-latest-xlarge + + steps: + # Checkout the repo + - name: Checkout repository + uses: actions/checkout@v4 + + # Cache + - name: Cache + uses: actions/cache@v3 + with: + path: | + .build + SourcePackagesCache + DerivedDataCache + key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} + restore-keys: | + ${{ runner.os }}-spm- + + # Install Flutter and Dependencies + - uses: ./.github/actions/dependencies + + # Build App + - name: Build App + working-directory: example/dapp + env: + PROJECT_ID: ${{ secrets.DAPP_PROJECT_ID }} + run: | + PUBSPEC_FILE=../../pubspec.yaml + FILE_VALUE=$(echo | grep "^version: " $PUBSPEC_FILE) + PARTS=(${FILE_VALUE//:/ }) + FULL_VERSION=${PARTS[1]} + VERSION_NUMBER=(${FULL_VERSION//-/ }) + + flutter build ios --flavor internal --build-name $VERSION_NUMBER --dart-define="PROJECT_ID=$PROJECT_ID" --config-only --release + + # Fastlane + - name: Fastlane + working-directory: example/dapp/ios + env: + BUNDLE_ID: "com.walletconnect.flutterdapp.internal" + APPLE_ID: ${{ secrets.APPLE_ID }} + APPLE_DAPP_ID: ${{ secrets.APPLE_DAPP_ID_INTERNAL }} + PROJECT_ID: ${{ secrets.DAPP_PROJECT_ID }} + MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} + APP_STORE_KEY_ID: ${{ secrets.APP_STORE_KEY_ID }} + APPLE_ISSUER_ID: ${{ secrets.APPLE_ISSUER_ID }} + GH_BASIC_AUTH: ${{ secrets.GH_BASIC_AUTH }} + APP_STORE_CONNECT_KEY: ${{ secrets.APP_STORE_CONNECT_KEY }} + MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }} + SLACK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + TESTFLIGHT_URL: ${{ secrets.TESTFLIGHT_URL_DAPP_INTERNAL }} + run: | + PUBSPEC_FILE=../../../pubspec.yaml + FILE_VALUE=$(echo | grep "^version: " $PUBSPEC_FILE) + PARTS=(${FILE_VALUE//:/ }) + FULL_VERSION=${PARTS[1]} + VERSION_NUMBER=(${FULL_VERSION//-/ }) + + fastlane release_testflight username:$APPLE_ID token:$GH_BASIC_AUTH project_id:$PROJECT_ID app_id:$APPLE_DAPP_ID app_store_key_id:$APP_STORE_KEY_ID apple_issuer_id:$APPLE_ISSUER_ID app_store_connect_key:"$APP_STORE_CONNECT_KEY" match_git_url:$MATCH_GIT_URL app_version:$VERSION_NUMBER flavor:internal + +# Launch locally +# act -j build --container-architecture linux/amd64 -P macos-latest-xlarge=-self-hosted --secret-file .github/workflows/.env.secret -W .github/workflows/release_dapp_ios_internal.yml diff --git a/.github/workflows/release_wallet_android.yml b/.github/workflows/release_wallet_android.yml index 0122af2b..12c74363 100644 --- a/.github/workflows/release_wallet_android.yml +++ b/.github/workflows/release_wallet_android.yml @@ -8,7 +8,8 @@ on: jobs: build: - if: github.event.pull_request.merged == true + # if: github.event.pull_request.merged == true + if: (github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'master') || github.event_name == 'workflow_dispatch' runs-on: macos-latest-xlarge steps: @@ -43,10 +44,12 @@ jobs: - name: Fastlane working-directory: example/wallet/android env: + FLAVOR: "production" PROJECT_ID: ${{ secrets.WALLET_PROJECT_ID }} SLACK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} FIREBASE_WALLET_ID: ${{ secrets.FIREBASE_WALLET_ID }} + DOWNLOAD_URL: ${{ secrets.DOWNLOAD_URL_WALLET }} run: | PUBSPEC_FILE=../../../pubspec.yaml FILE_VALUE=$(echo | grep "^version: " $PUBSPEC_FILE) diff --git a/.github/workflows/release_wallet_android_internal.yml b/.github/workflows/release_wallet_android_internal.yml new file mode 100644 index 00000000..ed9a0d92 --- /dev/null +++ b/.github/workflows/release_wallet_android_internal.yml @@ -0,0 +1,64 @@ +name: Android Web3Wallet deploy + +on: + workflow_dispatch: + pull_request: + types: + - closed + +jobs: + build: + # if: github.event.pull_request.merged == true + if: (github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'develop') || github.event_name == 'workflow_dispatch' + runs-on: macos-latest-xlarge + + steps: + # Checkout the repo + - name: Checkout repository + uses: actions/checkout@v4 + + # Install Java 17 + - name: Install Java 17 + uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: '17' + architecture: x86_64 + cache: 'gradle' + + # Cache Gradle + - 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- + + # Install Flutter and Dependencies + - uses: ./.github/actions/dependencies + + # Fastlane + - name: Fastlane + working-directory: example/wallet/android + env: + FLAVOR: "internal" + PROJECT_ID: ${{ secrets.WALLET_PROJECT_ID }} + SLACK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} + FIREBASE_WALLET_ID: ${{ secrets.FIREBASE_WALLET_ID_INTERNAL }} + DOWNLOAD_URL: ${{ secrets.DOWNLOAD_URL_WALLET_INTERNAL }} + run: | + PUBSPEC_FILE=../../../pubspec.yaml + FILE_VALUE=$(echo | grep "^version: " $PUBSPEC_FILE) + PARTS=(${FILE_VALUE//:/ }) + FULL_VERSION=${PARTS[1]} + VERSION_NUMBER=(${FULL_VERSION//-/ }) + + fastlane add_plugin firebase_app_distribution + fastlane release_firebase project_id:$PROJECT_ID app_version:$VERSION_NUMBER + +# Launch locally +# act -j build --container-architecture linux/amd64 -P macos-latest-xlarge=-self-hosted --secret-file .github/workflows/.env.secret -W .github/workflows/release_wallet_android.yml diff --git a/.github/workflows/release_wallet_ios.yml b/.github/workflows/release_wallet_ios.yml index ad817dde..a3b456e6 100644 --- a/.github/workflows/release_wallet_ios.yml +++ b/.github/workflows/release_wallet_ios.yml @@ -1,4 +1,4 @@ -name: iOS Web3Wallet deploy +name: iOS Web3Wallet (production) deploy on: workflow_dispatch: @@ -8,7 +8,7 @@ on: jobs: build: - if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch' + if: (github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'master') || github.event_name == 'workflow_dispatch' runs-on: macos-latest-xlarge steps: @@ -43,13 +43,13 @@ jobs: FULL_VERSION=${PARTS[1]} VERSION_NUMBER=(${FULL_VERSION//-/ }) - # flutter build ipa --build-name $VERSION_NUMBER --dart-define="PROJECT_ID=$PROJECT_ID" --release - flutter build ios --build-name $VERSION_NUMBER --dart-define="PROJECT_ID=$PROJECT_ID" --config-only --release + flutter build ios --flavor production --build-name $VERSION_NUMBER --dart-define="PROJECT_ID=$PROJECT_ID" --config-only --release # Fastlane - name: Fastlane working-directory: example/wallet/ios env: + BUNDLE_ID: "com.walletconnect.flutterwallet" APPLE_ID: ${{ secrets.APPLE_ID }} APPLE_DAPP_ID: ${{ secrets.APPLE_WALLET_ID }} PROJECT_ID: ${{ secrets.WALLET_PROJECT_ID }} @@ -60,6 +60,7 @@ jobs: APP_STORE_CONNECT_KEY: ${{ secrets.APP_STORE_CONNECT_KEY }} MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }} SLACK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + TESTFLIGHT_URL: ${{ secrets.TESTFLIGHT_URL_WALLET }} run: | PUBSPEC_FILE=../../../pubspec.yaml FILE_VALUE=$(echo | grep "^version: " $PUBSPEC_FILE) @@ -67,7 +68,7 @@ jobs: FULL_VERSION=${PARTS[1]} VERSION_NUMBER=(${FULL_VERSION//-/ }) - fastlane release_testflight username:$APPLE_ID token:$GH_BASIC_AUTH project_id:$PROJECT_ID app_id:$APPLE_DAPP_ID app_store_key_id:$APP_STORE_KEY_ID apple_issuer_id:$APPLE_ISSUER_ID app_store_connect_key:"$APP_STORE_CONNECT_KEY" match_git_url:$MATCH_GIT_URL app_version:$VERSION_NUMBER + fastlane release_testflight username:$APPLE_ID token:$GH_BASIC_AUTH project_id:$PROJECT_ID app_id:$APPLE_DAPP_ID app_store_key_id:$APP_STORE_KEY_ID apple_issuer_id:$APPLE_ISSUER_ID app_store_connect_key:"$APP_STORE_CONNECT_KEY" match_git_url:$MATCH_GIT_URL app_version:$VERSION_NUMBER flavor:production # Launch locally # act -j build --container-architecture linux/amd64 -P macos-latest-xlarge=-self-hosted --secret-file .github/workflows/.env.secret -W .github/workflows/release_wallet_ios.yml diff --git a/.github/workflows/release_wallet_ios_internal.yml b/.github/workflows/release_wallet_ios_internal.yml new file mode 100644 index 00000000..8a3a6cfc --- /dev/null +++ b/.github/workflows/release_wallet_ios_internal.yml @@ -0,0 +1,74 @@ +name: iOS Web3Wallet (internal) deploy + +on: + workflow_dispatch: + pull_request: + types: + - closed + +jobs: + build: + if: (github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'develop') || github.event_name == 'workflow_dispatch' + runs-on: macos-latest-xlarge + + steps: + # Checkout the repo + - name: Checkout repository + uses: actions/checkout@v4 + + # Cache + - name: Cache + uses: actions/cache@v3 + with: + path: | + .build + SourcePackagesCache + DerivedDataCache + key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} + restore-keys: | + ${{ runner.os }}-spm- + + # Install Flutter and Dependencies + - uses: ./.github/actions/dependencies + + # Build App + - name: Build App + working-directory: example/wallet + env: + PROJECT_ID: ${{ secrets.WALLET_PROJECT_ID }} + run: | + PUBSPEC_FILE=../../pubspec.yaml + FILE_VALUE=$(echo | grep "^version: " $PUBSPEC_FILE) + PARTS=(${FILE_VALUE//:/ }) + FULL_VERSION=${PARTS[1]} + VERSION_NUMBER=(${FULL_VERSION//-/ }) + + flutter build ios --flavor internal --build-name $VERSION_NUMBER --dart-define="PROJECT_ID=$PROJECT_ID" --config-only --release + + # Fastlane + - name: Fastlane + working-directory: example/wallet/ios + env: + BUNDLE_ID: "com.walletconnect.flutterwallet.internal" + APPLE_ID: ${{ secrets.APPLE_ID }} + APPLE_DAPP_ID: ${{ secrets.APPLE_WALLET_ID_INTERNAL }} + PROJECT_ID: ${{ secrets.WALLET_PROJECT_ID }} + MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} + APP_STORE_KEY_ID: ${{ secrets.APP_STORE_KEY_ID }} + APPLE_ISSUER_ID: ${{ secrets.APPLE_ISSUER_ID }} + GH_BASIC_AUTH: ${{ secrets.GH_BASIC_AUTH }} + APP_STORE_CONNECT_KEY: ${{ secrets.APP_STORE_CONNECT_KEY }} + MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }} + SLACK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + TESTFLIGHT_URL: ${{ secrets.TESTFLIGHT_URL_WALLET_INTERNAL }} + run: | + PUBSPEC_FILE=../../../pubspec.yaml + FILE_VALUE=$(echo | grep "^version: " $PUBSPEC_FILE) + PARTS=(${FILE_VALUE//:/ }) + FULL_VERSION=${PARTS[1]} + VERSION_NUMBER=(${FULL_VERSION//-/ }) + + fastlane release_testflight username:$APPLE_ID token:$GH_BASIC_AUTH project_id:$PROJECT_ID app_id:$APPLE_DAPP_ID app_store_key_id:$APP_STORE_KEY_ID apple_issuer_id:$APPLE_ISSUER_ID app_store_connect_key:"$APP_STORE_CONNECT_KEY" match_git_url:$MATCH_GIT_URL app_version:$VERSION_NUMBER flavor:internal + +# Launch locally +# act -j build --container-architecture linux/amd64 -P macos-latest-xlarge=-self-hosted --secret-file .github/workflows/.env.secret -W .github/workflows/release_wallet_ios_internal.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 5853e5f2..0c5a15d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 2.3.0-beta05 +## 2.3.0 - One-Click Auth support - Bug fixes and improvements diff --git a/example/dapp/android/app/build.gradle b/example/dapp/android/app/build.gradle index c3c083b9..f49bfe40 100644 --- a/example/dapp/android/app/build.gradle +++ b/example/dapp/android/app/build.gradle @@ -53,6 +53,19 @@ android { versionName flutterVersionName } + // Specifies one flavor dimension. + flavorDimensions = ["version"] + + productFlavors { + internal { + dimension "version" + applicationIdSuffix ".internal" + } + production { + dimension "version" + } + } + buildTypes { release { // TODO: Add your own signing config for the release build. @@ -60,6 +73,7 @@ android { signingConfig signingConfigs.debug } } + namespace 'com.walletconnect.flutterdapp' } diff --git a/example/dapp/android/app/src/main/AndroidManifest.xml b/example/dapp/android/app/src/main/AndroidManifest.xml index aad3033b..4efd0752 100644 --- a/example/dapp/android/app/src/main/AndroidManifest.xml +++ b/example/dapp/android/app/src/main/AndroidManifest.xml @@ -28,7 +28,13 @@ - + + + + + + +