Publish Flutter apps to AppCenter with Codemagic demo app for Codemagic article

Counter App

Demo app.

Publishing to App Center

Additional script to be added to your Workflow editor between build and publish as a post-build script.

The script publishes app to app-center.

echo 'Installing App Center CLI tools'
npm install -g appcenter-cli
echo "Publishing $aabPath to App Center"
appcenter distribute release \
    --group "Beta testers" \
    --file $aabPath \
    --release-notes 'App submission via Codemagic' \
    --app ivywalobwa/Counter-App \
    --token $APP_CENTER_TOKEN \
    --quiet
  • Beta testers is the name of your group.
  • $aabPath is set as an environment variable in the workflow editor. It’s the path to your .apk/.aab/.ipa artifacts. eg; build/app/outputs/bundle/release/app-release.aab
  • $APP_CENTER_TOKEN is set as an environment variable in the workflow editor. It’s the token obtained from user settings in App Center.
  • ivywalobwa/Counter-App is username/appname. App name on app center should match android app name.

Publish Images

Resources:

Publish app artifacts to App Center

GitHub

View Github