diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..f464871 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,37 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Build release + +run-name: Build v${{ inputs.version }} + +on: + workflow_call: + inputs: + version: + description: "Version" + required: true + type: string + binary-type: + description: "Binary type" + type: string + required: true + +jobs: + build-android: + uses: ./.github/workflows/build_apk.yml + if: ${{ inputs.binary-type != 'ipa' }} + with: + binary-type: ${{ inputs.binary-type }} + flavor: prod + stage-backend: false + version: ${{ inputs.version }} + + build-ios: + uses: ./.github/workflows/build_ipa.yml + if: ${{ inputs.binary-type == 'ipa' }} + with: + stage-backend: false + version: ${{ inputs.version }} diff --git a/.github/workflows/build_apk.yml b/.github/workflows/build_apk.yml index 599111a..b49b638 100644 --- a/.github/workflows/build_apk.yml +++ b/.github/workflows/build_apk.yml @@ -5,7 +5,7 @@ name: Build Android -run-name: Build ${{ inputs.binary-type == 'apk' && '.apk' || '.aab' }} v${{ inputs.version }} +run-name: Build Android (${{ inputs.binary-type == 'apk' && '.apk' || '.aab' }}) v${{ inputs.version }} on: workflow_call: diff --git a/.github/workflows/build_ipa.yml b/.github/workflows/build_ipa.yml index f8481b8..2c786b5 100644 --- a/.github/workflows/build_ipa.yml +++ b/.github/workflows/build_ipa.yml @@ -5,7 +5,7 @@ name: Build iOS -run-name: Build .ipa v${{ inputs.version }} +run-name: Build iOS v${{ inputs.version }} on: workflow_call: @@ -87,9 +87,13 @@ jobs: - name: Restore GoogleService-Info.plist run: bash .github/scripts/restore_from_base64.sh "${{ secrets.GOOGLE_SERVICES_JSON_IOS }}" "ios/Runner/GoogleService-Info.plist" - - name: Restore ios/Runner/ExportOptions.plist + - name: Restore ExportOptions.plist run: bash .github/scripts/restore_from_base64.sh "${{ secrets.APP_STORE_EXPORT_OPTIONS }}" "ios/Runner/ExportOptions.plist" + + - name: Restore firebase_app_id_file.json + run: bash .github/scripts/restore_from_base64.sh "${{ secrets.FIREBASE_APP_ID_FILE }}" "ios/firebase_app_id_file.json" + - name: Restore firebase_options.dart run: bash .github/scripts/restore_from_base64.sh "${{ secrets.FIREBASE_OPTIONS }}" "lib/firebase_options.dart" diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index d2ff71c..bf9266e 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -33,28 +33,13 @@ jobs: build: name: Build ${{ matrix.binary-type != 'ipa' && 'Android' || 'iOS' }} (.${{ matrix.binary-type }}) #needs: [run-integration-tests] - runs-on: macos-11 strategy: matrix: binary-type: [apk, appbundle, ipa] - steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - - - uses: ./.github/workflows/build_apk.yml - if: ${{ matrix.binary-type != 'ipa' }} - with: - binary-type: ${{ matrix.binary-type }} - flavor: prod - stage-backend: false - version: ${{ inputs.version }} - - - uses: ./.github/workflows/build_ipa.yml - if: false - with: - stage-backend: false - version: ${{ inputs.version }} + uses: ./.github/workflows/build.yml + with: + binary-type: ${{ matrix.binary-type }} + version: ${{ inputs.version }} generate-release-notes: name: Generate release notes