Skip to content

minor change

minor change #5

# name: iOS Modal (production) deploy
# on:
# workflow_dispatch:
# push:
# # branches:
# # - 'release_v*' #${{ github.ref_name }}
# tags:
# - v[0-9]+.[0-9]+.[0-9]+
# jobs:
# build_with_signing:
# runs-on: macos-latest-xlarge
# steps:
# # Checkout the repo
# - name: Checkout repository
# uses: actions/checkout@v4
# # Install the Apple certificate and provisioning profile
# - name: Install the Apple certificate and provisioning profile
# env:
# BUILD_CERTIFICATE_BASE64: ${{ secrets.APPLE_DISTRIBUTION_CERT }}
# P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
# BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.PROVISIONING_PROFILE_BASE64 }}
# KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
# run: |
# # create variables
# BUILD_CERT_PATH=$RUNNER_TEMP/build_certificate.p12
# PP_PATH=$RUNNER_TEMP/FlutterAppStoreProfileWithPush.mobileprovision
# KEYCHAIN_PATH=$RUNNER_TEMP/release-modal.keychain-db
# # import certificate and provisioning profile from secrets
# echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $BUILD_CERT_PATH
# echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode -o $PP_PATH
# # create temporary keychain
# security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
# security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
# security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
# # import certificate to keychain
# security import $BUILD_CERT_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
# security list-keychain -d user -s $KEYCHAIN_PATH
# # apply provisioning profile
# mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
# cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
# # Create p8 Auth Key from secrets
# - name: Create p8 Auth Key
# env:
# APP_STORE_CONNECT_KEY: ${{ secrets.APP_STORE_CONNECT_KEY }}
# APP_STORE_KEY_ID: ${{ secrets.APP_STORE_KEY_ID }}
# run: |
# # Create private_keys folder
# KEY_PATH=$GITHUB_WORKSPACE/example/build/ios/ipa/private_keys
# mkdir -p $KEY_PATH
# AUTH_KEY_PATH=$KEY_PATH/AuthKey_$APP_STORE_KEY_ID.p8
# # import certificate and provisioning profile from secrets
# echo -n "$APP_STORE_CONNECT_KEY" | base64 --decode -o $AUTH_KEY_PATH
# # Install Flutter and Dependencies
# - uses: ./.github/actions/dependencies
# with:
# working-directory: packages/reown_appkit/example/modal
# # Build ios example app
# - name: Build ios example app
# working-directory: packages/reown_appkit/example/modal
# env:
# PROJECT_ID: ${{ secrets.PROJECT_ID }}
# APP_STORE_KEY_ID: ${{ secrets.APP_STORE_KEY_ID }}
# APPLE_ISSUER_ID: ${{ secrets.APPLE_ISSUER_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
# # FILE_VALUE=$(echo | grep "^version: " pubspec.yaml)
# # PARTS=(${FILE_VALUE//:/ })
# # FULL_VERSION=${PARTS[1]}
# VERSION_NUMBER=4.0.0
# # Build ios app with flutter
# flutter build ios --build-name $VERSION_NUMBER --dart-define="PROJECT_ID=$PROJECT_ID" --dart-define="APPKIT_AUTH=$APPKIT_AUTH" --dart-define="APPKIT_PROJECT_ID=$APPKIT_PROJECT_ID" --dart-define="AUTH_SERVICE_URL=$AUTH_SERVICE_URL" --config-only --release
# cd ios
# agvtool new-marketing-version $VERSION_NUMBER
# agvtool next-version -all
# # Archive and export
# xcodebuild -workspace "$GITHUB_WORKSPACE/packages/reown_appkit/example/modal/ios/Runner.xcworkspace" -scheme Runner -sdk iphoneos -destination generic/platform=iOS -archivePath "$GITHUB_WORKSPACE/example/ios/Runner.xcarchive" archive
# xcodebuild -exportArchive -allowProvisioningUpdates -sdk iphoneos -archivePath "$GITHUB_WORKSPACE/packages/reown_appkit/example/modal/ios/Runner.xcarchive" -exportOptionsPlist "$GITHUB_WORKSPACE/packages/reown_appkit/example/modal/ios/Runner/ExportOptionsInternal.plist" -exportPath "$GITHUB_WORKSPACE/packages/reown_appkit/example/modal/build/ios/ipa" -authenticationKeyIssuerID $APPLE_ISSUER_ID -authenticationKeyID $APP_STORE_KEY_ID -authenticationKeyPath "$GITHUB_WORKSPACE/packages/reown_appkit/example/modal/build/ios/ipa/private_keys/AuthKey_$APP_STORE_KEY_ID.p8"
# # Upload IPA to Testflight
# - name: Upload IPA to Testflight
# working-directory: example/build/ios/ipa
# env:
# APPLE_ISSUER_ID: ${{ secrets.APPLE_ISSUER_ID }}
# APP_STORE_KEY_ID: ${{ secrets.APP_STORE_KEY_ID }}
# run: xcrun altool --upload-app --type ios -f web3modal_flutter.ipa --apiKey $APP_STORE_KEY_ID --apiIssuer $APPLE_ISSUER_ID
# # Notify Channel
# - name: Notify Channel
# uses: slackapi/slack-github-action@v1.24.0
# env:
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
# SLACK_WEBHOOK_TYPE: 'INCOMING_WEBHOOK'
# with:
# payload: |-
# {
# "text":"🍎 AppKit *Modal* Flutter Sample *${{ github.ref_name }}* was just deployed."
# }
# # # Clean up
# - name: Clean up
# if: ${{ always() }}
# run: |
# security delete-keychain $RUNNER_TEMP/release-modal.keychain-db
# rm ~/Library/MobileDevice/Provisioning\ Profiles/FlutterAppStoreProfileWithPush.mobileprovision
# flutter clean
# cd example
# flutter clean