-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Creating codemagic.yaml. codemagic.yaml is a highly customizable configuration file that you can use to build, test and publish Flutter apps, widgets, and Flutter or Dart packages. The Workflow Editor is a quick way to get started building standard Flutter applications. 😜 You can simultaneously set up workflows both in codemagic.yaml and the Workflow Editor. However, when a codemagic.yaml is detected in the repository, it is automatically used for configuring builds that are triggered in response to the events defined in the file and any configuration in the Flutter workflow editor is ignored. 🤳
- Loading branch information
Showing
1 changed file
with
152 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
workflows: | ||
android-workflow: | ||
name: Android Workflow | ||
instance_type: mac_mini_m1 | ||
max_build_duration: 120 | ||
environment: | ||
android_signing: | ||
- keystore_reference | ||
groups: | ||
- google_play # <-- (Includes GCLOUD_SERVICE_ACCOUNT_CREDENTIALS) | ||
vars: | ||
PACKAGE_NAME: "com.rechain.online" # <-- Put your package name here | ||
GOOGLE_PLAY_TRACK: "stable" | ||
flutter: stable | ||
scripts: | ||
- name: Set up local.properties | ||
script: | | ||
echo "flutter.sdk=$HOME/programs/flutter" > "$CM_BUILD_DIR/android/local.properties" | ||
- name: Get Flutter packages | ||
script: | | ||
flutter packages pub get | ||
- name: Flutter analyze | ||
script: | | ||
flutter analyze | ||
- name: Flutter unit tests | ||
script: | | ||
flutter test | ||
ignore_failure: true | ||
- name: Build AAB with Flutter | ||
script: | | ||
BUILD_NUMBER=$(($(google-play get-latest-build-number --package-name "$PACKAGE_NAME" --tracks="$GOOGLE_PLAY_TRACK") + 1)) | ||
flutter build appbundle --release \ | ||
--build-name=rechainonline \ | ||
--build-number=$BUILD_NUMBER | ||
artifacts: | ||
- build/**/outputs/**/*.aab | ||
- build/**/outputs/**/mapping.txt | ||
- flutter_drive.log | ||
publishing: | ||
email: | ||
recipients: | ||
- [email protected] | ||
- [email protected] | ||
notify: | ||
success: true | ||
failure: false | ||
google_play: | ||
credentials: $GCLOUD_SERVICE_ACCOUNT_CREDENTIALS | ||
track: $GOOGLE_PLAY_TRACK | ||
submit_as_draft: true | ||
ios-workflow: | ||
name: iOS Workflow | ||
instance_type: mac_mini_m1 | ||
max_build_duration: 120 | ||
integrations: | ||
app_store_connect: codemagic | ||
environment: | ||
ios_signing: | ||
distribution_type: app_store | ||
bundle_identifier: com.rechain.online | ||
vars: | ||
APP_ID: 1570644022 # <-- Put your APP ID here | ||
flutter: stable | ||
xcode: latest # <-- set to specific version e.g. 14.3, 15.0 to avoid unexpected updates. | ||
cocoapods: default | ||
scripts: | ||
- name: Set up code signing settings on Xcode project | ||
script: | | ||
xcode-project use-profiles | ||
- name: Get Flutter packages | ||
script: | | ||
flutter packages pub get | ||
- name: Install pods | ||
script: | | ||
find . -name "Podfile" -execdir pod install \; | ||
- name: Flutter analyze | ||
script: | | ||
flutter analyze | ||
- name: Flutter unit tests | ||
script: | | ||
flutter test | ||
ignore_failure: true | ||
- name: Flutter build ipa and automatic versioning | ||
script: | | ||
flutter build ipa --release \ | ||
--build-name=rechainonline \ | ||
--build-number=$(($(app-store-connect get-latest-app-store-build-number "$APP_ID") + 1)) \ | ||
--export-options-plist=/Users/builder/export_options.plist | ||
artifacts: | ||
- build/ios/ipa/*.ipa | ||
- /tmp/xcodebuild_logs/*.log | ||
- flutter_drive.log | ||
publishing: | ||
# See the following link for details about email publishing - https://docs.codemagic.io/publishing-yaml/distribution/#email | ||
email: | ||
recipients: | ||
- [email protected] | ||
- [email protected] | ||
notify: | ||
success: true # To receive a notification when a build succeeds | ||
failure: false # To not receive a notification when a build fails | ||
slack: | ||
# See the following link about how to connect your Slack account - https://docs.codemagic.io/publishing-yaml/distribution/#slack | ||
channel: "#builds" | ||
notify_on_build_start: true # To receive a notification when a build starts | ||
notify: | ||
success: true # To receive a notification when a build succeeds | ||
failure: false # To not receive a notification when a build fails | ||
app_store_connect: | ||
auth: integration | ||
|
||
# Configuration related to TestFlight (optional) | ||
# Note: This action is performed during post-processing. | ||
submit_to_testflight: false | ||
beta_groups: # Specify the names of beta tester groups that will get access to the build once it has passed beta review. | ||
- group name 1 | ||
- group name 2 | ||
|
||
# Configuration related to App Store (optional) | ||
# Note: This action is performed during post-processing. | ||
submit_to_app_store: true | ||
|
||
web-workflow: | ||
name: Web app workflow | ||
max_build_duration: 120 | ||
environment: | ||
flutter: stable | ||
scripts: | ||
- name: Get Flutter packages | ||
script: | | ||
flutter packages pub get | ||
- name: Flutter analyze | ||
script: | | ||
flutter analyze | ||
- name: Flutter unit tests | ||
script: | | ||
flutter test | ||
- name: Flutter build webapp | ||
script: | | ||
flutter build web --release | ||
cd build/web | ||
7z a -r ../web.zip ./* | ||
artifacts: | ||
- build/web.zip | ||
- flutter_drive.log | ||
publishing: | ||
email: | ||
recipients: | ||
- [email protected] | ||
|
||
|
||
|