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
description: Include IAP package
default: true
stage-backend:
type: boolean
description: Use stage backend
default: true
workflow_dispatch:
inputs:
version:
@ -51,6 +55,10 @@ on:
type: boolean
description: Include IAP package
default: true
stage-backend:
type: boolean
description: Use stage backend
default: true
env:
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 }}" "$RUNNER_TEMP/android/keystore.jks"
- name: Restore secrets
run: |
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"
bash .github/scripts/restore_from_base64.sh "${{ secrets.GOOGLE_SERVICES_JSON_ANDROID }}" "android/app/google-services.json"
- name: Restore google-services.json
run: bash .github/scripts/restore_from_base64.sh "${{ secrets.GOOGLE_SERVICES_JSON_ANDROID }}" "android/app/google-services.json"
- name: Restore firebase_options.dart
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
run: bash ./.github/scripts/increment_build_number.sh ${{ github.event.inputs.version }}

View file

@ -7,6 +7,11 @@ name: Build Prod .ipa
on:
workflow_dispatch:
inputs:
stage-backend:
type: boolean
description: Use stage backend
default: true
env:
FLAVOR: "prod"
@ -62,7 +67,9 @@ jobs:
run: bash .github/scripts/restore_from_base64.sh "${{ secrets.FIREBASE_OPTIONS }}" "lib/firebase_options.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
uses: subosito/flutter-action@v2
@ -89,7 +96,7 @@ jobs:
with:
name: m3_lightmeter_$FLAVOR_ipa
path: build/ios/ipa/lightmeter.ipa
- name: Clean up keychain and provisioning profile
if: ${{ always() }}
run: |

View file

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