diff --git a/.github/workflows/publish_to_apple_appstore_connect.yml b/.github/workflows/publish_to_apple_appstore_connect.yml new file mode 100644 index 000000000..26f89c295 --- /dev/null +++ b/.github/workflows/publish_to_apple_appstore_connect.yml @@ -0,0 +1,44 @@ +name: Deploy Flutter App to Appstore Connect + +on: + push: + branches: + - beta + - cl/publish-from-ci + +jobs: + build-and-deploy: + runs-on: macos-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install flutter wrapper + run: ./scripts/install_flutter_wrapper.sh + + - name: Get dependencies (i.e., melos) + run: .flutter/bin/dart pub get + + - name: Melos Bootstrap + run: .flutter/bin/dart run melos bootstrap + + - name: Setup Apple Code Signing - Import Certificates and Provisioning Profiles + uses: apple-actions/import-codesign-certs@v1 + with: + p12-file-base64: ${{ secrets.CERT_P12_BASE64 }} + p12-password: ${{ secrets.CERT_P12_PASSWORD }} + mobileprovision-file-base64: ${{ secrets.MOBILE_PROVISION_BASE64 }} + + - name: Build iOS IPA + run: .flutter/bin/dart run melos build-ipa-release + env: + CI: true + + - name: Upload to App Store Connect + uses: appleboy/app-store-connect-action@v1.1.0 + with: + issuer_id: ${{ secrets.APP_STORE_ISSUER_ID }} + key_id: ${{ secrets.APP_STORE_KEY_ID }} + private_key: ${{ secrets.APP_STORE_PRIVATE_KEY }} + ipa_path: app/build/ios/ipa/*.ipa diff --git a/.github/workflows/publish_to_googe_playconsole.yml b/.github/workflows/publish_to_googe_playconsole.yml new file mode 100644 index 000000000..628c417d7 --- /dev/null +++ b/.github/workflows/publish_to_googe_playconsole.yml @@ -0,0 +1,40 @@ +name: Deploy Flutter App to Google Playconsole + +on: + push: + branches: + - beta + +# Cancel a currently running workflow from the same PR, branch or tag when a new workflow is +# triggered (ref https://stackoverflow.com/a/72408109) +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install flutter wrapper + run: ./scripts/install_flutter_wrapper.sh + + - name: Get dependencies (i.e., melos) + run: .flutter/bin/dart pub get + + - name: Melos Bootstrap + run: .flutter/bin/dart run melos bootstrap + + - name: Build Android AppBundle + run: .flutter/bin/dart run melos build-appbundle-release + + - name: Deploy to Google Play (Beta) + uses: r0adkll/upload-google-play@v1 + with: + serviceAccountJson: ${{ secrets.GOOGLE_PLAY_JSON }} + packageName: org.encointer.wallet + releaseFiles: app/build/app/outputs/bundle/release/app-release.aab + track: beta # Publish to the beta track diff --git a/melos.yaml b/melos.yaml index 55d2efc26..251581327 100644 --- a/melos.yaml +++ b/melos.yaml @@ -111,9 +111,13 @@ scripts: run: cd app && flutter build apk --split-per-abi --flavor dev description: "Build an APK file" - build-appbundle: - run: cd app && flutter build appbundle - description: "Build an appbundle file" + build-appbundle-release: + run: cd app && flutter build appbundle --release + description: "Build an appbundle file ready to be submitted to the google play console" + + build-ipa-release: + run: cd app && flutter build appbundle --release + description: "Build an appbundle file ready to be submitted to the google play console" # Integration test Encointer Wallet integration-app-test-android: