apprelease.yaml
Optional. Without this file the runner builds with the settings of the application in the console, which is all most teams need. Add it to the root of the repository to change how the app is built. Key by key:
Structure
workflows:
<workflow-id>:
name: Human readable name
max_build_duration: 60 # minutes, default 60, max 120
instance_type: mac_m2 # mac_m2 | linux_x2
environment: { ... }
versioning: { ... }
triggering: { ... }
cache: { ... }
scripts: [ ... ]
artifacts: [ ... ]
publishing: { ... }environment
environment:
flutter: stable # stable | beta | master | 3.41.2 | fvm
xcode: latest # latest | 26.0
cocoapods: default
java: 17
groups: # variable groups defined in the console
- google_play
vars: # plain variables, visible in the log
PACKAGE_NAME: "com.example.app"
android_signing:
- upload_keystore
ios_signing:
distribution_type: app_store
bundle_identifier: com.example.app| Key | Description |
|---|---|
flutter | Channel, version or fvm. Omit to use the runner's preinstalled version. |
xcode | macOS runners only. latest or a version. |
groups | Reference names of Google Play service accounts under Credentials. The JSON becomes GOOGLE_PLAY_SERVICE_ACCOUNT, masked in logs. |
vars | Inline variables. Never put secrets here; the file is in your repository. |
android_signing | Keystore reference names. See Android code signing. |
ios_signing | Automatic or manual signing. See iOS code signing. |
versioning
versioning:
source: google_play # google_play | app_store_connect | manual
tracks: [internal, production] # google_play only; default: all tracks
offset: 0 # added to the fetched number; default 0Sets AR_BUILD_NUMBER to one more than the highest build number found. With manual, it is the release's own sequence number.
triggering
triggering:
events:
- push
- tag
branch_patterns:
- pattern: main
include: true
source: true
tag_patterns:
- pattern: "v*"
include: true
cancel_previous_builds: trueRequires the repository webhook, which the console shows under the app's Settings → Webhooks. Without a triggering section, releases start only by hand.
cache
cache:
cache_paths:
- $HOME/.pub-cache
- $HOME/.gradle/caches
- $AR_BUILD_DIR/ios/Podsscripts
scripts:
- name: Get packages
script: flutter pub get
- name: Test
script: flutter test
ignore_failure: false # default
- name: Build
script: |
flutter build appbundle --release \
--build-number=$AR_BUILD_NUMBER
working_directory: . # relative to AR_BUILD_DIRScripts run in order with bash -e. The first failure stops the workflow unless ignore_failure is set. Everything they print goes to the live log; secrets are masked.
artifacts
artifacts:
- build/**/outputs/**/*.aab
- build/ios/ipa/*.ipa
- flutter_drive.logGlob patterns relative to AR_BUILD_DIR. Matching files are kept for the plan's retention period and are what the publishing steps upload.
publishing
publishing:
email:
recipients: [team@example.com]
notify: { success: true, failure: true }
google_play:
credentials: $GOOGLE_PLAY_SERVICE_ACCOUNT
track: internal
app_store_connect:
auth: integration
submit_to_testflight: true
scripts: # runs after publishing, success or not
- name: Notify
script: curl -X POST "$WEBHOOK" -d "status=$AR_BUILD_STATUS"See Google Play and App Store Connect for every key.
Environment variables
Set by the runner before the first script.
| Variable | Value |
|---|---|
CI | true |
AR_BUILD_DIR | Absolute path of the checked-out repository |
AR_BUILD_ID | Id of the release in AppRelease |
AR_BUILD_NUMBER | Next build number, see versioning |
AR_BUILD_STATUS | success or failure, in post-publishing scripts |
AR_WORKFLOW | Workflow id |
AR_BRANCH | Branch name |
AR_TAG | Tag name, if the release was started by a tag |
AR_COMMIT | Full commit SHA |
AR_COMMIT_SHORT | First seven characters |
AR_FLUTTER_VERSION | The Flutter version that was installed |
AR_KEYSTORE_PATH … | Android signing, see Android code signing |
AR_EXPORT_OPTIONS … | iOS signing, see iOS code signing |
AR_ARTIFACT_DIR | Where collected artifacts are copied |