added stage backend option

This commit is contained in:
Vadim 2024-03-14 15:15:08 +01:00
parent 4ed3d4efb9
commit 6f0efe4b39
3 changed files with 28 additions and 12 deletions

View file

@ -26,6 +26,10 @@ on:
type: boolean type: boolean
description: Include IAP package description: Include IAP package
default: true default: true
stage-backend:
type: boolean
description: Use stage backend
default: true
workflow_dispatch: workflow_dispatch:
inputs: inputs:
version: version:
@ -51,6 +55,10 @@ on:
type: boolean type: boolean
description: Include IAP package description: Include IAP package
default: true default: true
stage-backend:
type: boolean
description: Use stage backend
default: true
env: env:
BUILD_ARGS: --release --flavor ${{ inputs.flavor }} -t lib/main_${{ inputs.flavor }}.dart BUILD_ARGS: --release --flavor ${{ inputs.flavor }} -t lib/main_${{ inputs.flavor }}.dart
@ -93,11 +101,16 @@ jobs:
bash .github/scripts/restore_from_base64.sh "${{ secrets.KEYSTORE_PROPERTIES }}" "$RUNNER_TEMP/android/app/key.properties" bash .github/scripts/restore_from_base64.sh "${{ secrets.KEYSTORE_PROPERTIES }}" "$RUNNER_TEMP/android/app/key.properties"
bash .github/scripts/restore_from_base64.sh "${{ secrets.KEYSTORE }}" "$RUNNER_TEMP/android/keystore.jks" bash .github/scripts/restore_from_base64.sh "${{ secrets.KEYSTORE }}" "$RUNNER_TEMP/android/keystore.jks"
- name: Restore secrets - name: Restore google-services.json
run: | run: bash .github/scripts/restore_from_base64.sh "${{ secrets.GOOGLE_SERVICES_JSON_ANDROID }}" "android/app/google-services.json"
bash .github/scripts/restore_from_base64.sh "${{ secrets.FIREBASE_OPTIONS }}" "lib/firebase_options.dart"
bash .github/scripts/restore_from_base64.sh "${{ secrets.CONSTANTS }}" "lib/constants.dart" - name: Restore firebase_options.dart
bash .github/scripts/restore_from_base64.sh "${{ secrets.GOOGLE_SERVICES_JSON_ANDROID }}" "android/app/google-services.json" run: bash .github/scripts/restore_from_base64.sh "${{ secrets.FIREBASE_OPTIONS }}" "lib/firebase_options.dart"
- name: Restore constants.dart
env:
CONSTANTS: ${{inputs.stage-backend && secrets.CONSTANTS_STAGE || secrets.CONSTANTS }}
run: bash .github/scripts/restore_from_base64.sh "${{ env.CONSTANTS }}" "lib/constants.dart"
- name: Increment build number & replace version number - name: Increment build number & replace version number
run: bash ./.github/scripts/increment_build_number.sh ${{ github.event.inputs.version }} run: bash ./.github/scripts/increment_build_number.sh ${{ github.event.inputs.version }}

View file

@ -7,6 +7,11 @@ name: Build Prod .ipa
on: on:
workflow_dispatch: workflow_dispatch:
inputs:
stage-backend:
type: boolean
description: Use stage backend
default: true
env: env:
FLAVOR: "prod" FLAVOR: "prod"
@ -62,7 +67,9 @@ jobs:
run: bash .github/scripts/restore_from_base64.sh "${{ secrets.FIREBASE_OPTIONS }}" "lib/firebase_options.dart" run: bash .github/scripts/restore_from_base64.sh "${{ secrets.FIREBASE_OPTIONS }}" "lib/firebase_options.dart"
- name: Restore constants.dart - name: Restore constants.dart
run: bash .github/scripts/restore_from_base64.sh "${{ secrets.CONSTANTS }}" "lib/constants.dart" env:
CONSTANTS: ${{inputs.stage-backend && secrets.CONSTANTS_STAGE || secrets.CONSTANTS }}
run: bash .github/scripts/restore_from_base64.sh "${{ env.CONSTANTS }}" "lib/constants.dart"
- name: Install Flutter - name: Install Flutter
uses: subosito/flutter-action@v2 uses: subosito/flutter-action@v2

View file

@ -22,10 +22,6 @@ on:
description: "Release notes" description: "Release notes"
required: true required: true
type: string type: string
include-iap:
type: boolean
description: Include IAP package
default: true
jobs: jobs:
run-integration-tests: run-integration-tests:
@ -45,7 +41,7 @@ jobs:
with: with:
binary-type: ${{ matrix.binary-type }} binary-type: ${{ matrix.binary-type }}
flavor: prod flavor: prod
include-iap: ${{ inputs.include-iap }} stage-backend: false
version: ${{ inputs.version }} version: ${{ inputs.version }}
generate-release-notes: generate-release-notes: