6177214e-ce7c-49e3-99de-ff9721b26f63 — Commit e34846a0

AuthorMikkel Thygesen<mikkelet@gmail.com>
Date2026-03-17 11:02:01 +0100
Devops: added prod pipelines

Changed files

.github/workflows/build-android-prod.yml | 69 +++++++++++++++++++++++
 .github/workflows/build-ios-prod.yml     | 96 ++++++++++++++++++++++++++++++++
 2 files changed, 165 insertions(+)

Diff

diff --git a/.github/workflows/build-android-prod.yml b/.github/workflows/build-android-prod.yml
new file mode 100644
index 00000000..25e79d30
--- /dev/null
+++ b/.github/workflows/build-android-prod.yml
@@ -0,0 +1,69 @@
+name: "Android Prod"
+
+on:
+ push:
+ branches: [ "master" ]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Clone repository
+ uses: actions/checkout@v5
+ with:
+ fetch-depth: 0 # we need the git history for the build number
+
+ - name: Set up Flutter
+ uses: subosito/flutter-action@v2
+ with:
+ channel: stable
+ flutter-version: 3.35.4
+
+ - uses: actions/setup-java@v4
+ with:
+ distribution: "corretto"
+ java-version: '21'
+
+ - name: Download dotenv
+ env:
+ DOTENV_FILE: ${{ secrets.DOTENV_PROD }}
+ FILE_NAME: .prod.env
+ run: >-
+ sh .github/workflows/scripts/all_download_dotenv.sh
+ $DOTENV_FILE
+ $FILE_NAME
+
+ - name: Flutterfire
+ run: |
+ sh .github/workflows/scripts/all_install_flutterfire.sh
+
+ - name: pigeon
+ run: |
+ sh .github/workflows/scripts/all_run_pigeon.sh
+
+ - name: Download Keystore Files
+ env:
+ KEYSTORE_FILE: ${{ secrets.KEYSTORE_FILE }}
+ KEYSTORE_PROPS: ${{ secrets.KEYSTORE_PROPERTIES }}
+ run: |
+ KEYSTORE_PATH=comwell_key_app/android/comwell_keystore.jks
+ PROPERTIES_PATH=comwell_key_app/android/key.properties
+ echo "$KEYSTORE_FILE" | base64 -d > $KEYSTORE_PATH
+ echo "$KEYSTORE_PROPS" | base64 -d > $PROPERTIES_PATH
+
+ - name: flutter build aab
+ env:
+ FLAVOR: prod
+ run: |
+ sh .github/workflows/scripts/android_build_aab.sh $FLAVOR
+
+ - id: upload-google
+ name: Upload Google Play Console
+ uses: r0adkll/upload-google-play@v1.1.3
+ with:
+ serviceAccountJsonPlainText: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }}
+ packageName: com.comwell.phoenix
+ releaseFiles: comwell_key_app/build/app/outputs/bundle/ProdRelease/app-Prod-release.aab
+ changesNotSentForReview: false
+ track: internal
+ status: draft
diff --git a/.github/workflows/build-ios-prod.yml b/.github/workflows/build-ios-prod.yml
new file mode 100644
index 00000000..aad335bc
--- /dev/null
+++ b/.github/workflows/build-ios-prod.yml
@@ -0,0 +1,96 @@
+name: "iOS Prod"
+
+on:
+ push:
+ branches: [ "master" ]
+
+jobs:
+ build:
+ runs-on: macos-26
+ steps:
+ - name: Use Node
+ uses: actions/setup-node@v6
+ with:
+ node-version: 24
+ - name: Clone repository
+ uses: actions/checkout@v5
+ with:
+ fetch-depth: 0 # we need the git history for the build number
+ - name: Set up Flutter
+ uses: subosito/flutter-action@v2
+ with:
+ channel: stable
+ flutter-version: 3.35.4
+
+ - name: xcode version
+ run: |
+ sudo xcode-select -s /Applications/Xcode_26.2.app
+ /usr/bin/xcodebuild -version
+
+ - name: Install the Apple certificate and provisioning profile
+ shell: sh
+ env:
+ CERTIFICATE_P12: ${{ secrets.DISTRIBUTION_CERTIFICATE }}
+ P12_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }}
+ PROVISIONING_PROFILE: ${{ secrets.PROV_PROFILE_PROD }}
+ run: |
+ sh .github/workflows/scripts/ios_install_signing_files.sh $CERTIFICATE_P12 $P12_PASSWORD $PROVISIONING_PROFILE
+
+ - name: Download dotenv
+ env:
+ DOTENV_FILE: ${{ secrets.DOTENV_PROD }}
+ FILE_NAME: .prod.env
+ run: >-
+ sh .github/workflows/scripts/all_download_dotenv.sh
+ $DOTENV_FILE
+ $FILE_NAME
+
+ - name: Update build number
+ run: |
+ sh .github/workflows/scripts/ios_update_version_number.sh
+
+ - name: Enabled SPM
+ run: flutter config --enable-swift-package-manager
+
+ - name: Flutterfire
+ run: |
+ sh .github/workflows/scripts/all_install_flutterfire.sh
+
+ - name: pigeon
+ run: |
+ sh .github/workflows/scripts/all_run_pigeon.sh
+
+ - name: Update Pods
+ run: |
+ gem install cocoapods
+
+ - name: flutter build ipa
+ env:
+ FLAVOR: prod
+ run: |
+ sh .github/workflows/scripts/ios_build_ipa.sh $FLAVOR
+
+ - name: Archive
+ env:
+ SCHEME: Prod
+ run: sh .github/workflows/scripts/ios_archive.sh $SCHEME
+
+ - name: export
+ env:
+ EXPORT_OPTIONS_PATH: comwell_key_app/ios/ExportOptions.plist
+ run: sh .github/workflows/scripts/ios_export.sh $EXPORT_OPTIONS_PATH
+
+ - name: Validate & upload
+ env:
+ API_KEY: ${{ secrets.APP_STORE_API_KEY }}
+ ISSUER_ID: ${{ secrets.APP_STORE_ISSUER_ID }}
+ APP_STORE_KEY_ID: ${{ secrets.APP_STORE_KEY_ID }}
+ IPA_PATH: "comwell_key_app/output/Comwell Phoenix.ipa"
+ run: |
+ mkdir ~/.private_keys
+ API_KEY_FILE_NAME=AuthKey_$APP_STORE_KEY_ID.p8
+ API_KEY_PATH=~/.private_keys/$API_KEY_FILE_NAME
+ echo "$API_KEY" | base64 --decode -o "$API_KEY_PATH"
+
+ xcrun altool --validate-app -f "$IPA_PATH" -t ios --apiKey "$APP_STORE_KEY_ID" --apiIssuer "$ISSUER_ID"
+ xcrun altool --upload-app -f "$IPA_PATH" -t ios --apiKey "$APP_STORE_KEY_ID" --apiIssuer "$ISSUER_ID"