Microsoft App Center
How to upload an apk or ipa file to App Center in a Flutter workflow editor post-build script
As a custom build step, Codemagic can publish your app artifact to App Center using the App Center Command Line Interface. An App Center API token is required for publishing. It is advisable to create a new token for use on Codemagic, see the commands related to API tokens here or manage your tokens in App Center settings. A token is generated under user settings, not app settings.
Configure environment variables
Open your Codemagic app settings, and go to the Environment variables tab.
Enter the desired Variable name, e.g.
Enter your App Center API token as Variable value.
Enter the variable group name, e.g. app_center_credentials. Click the button to create the group.
Make sure the Secure option is selected.
Click the Add button to add the variable.
Repeat the steps to also add
APP_CENTER_APP_NAMEvariables. Username is your App Center username when signing up. Alternatively, you can use a combination of organization name (in case of creating one in the App Center UI) and Application identifier (your app’s Bundle identifier / Package name).
Add the variable group to your
environment: groups: - app_center_credentials
Publish to App Center
Add the following script to your
codemagic.yaml file. If you are using Flutter workflow editor,
go to your app settings, expand the step between Build and Publish steps and add the respective post-build script.
- name: Publish to App Center
echo 'Installing App Center CLI tools'
npm install -g appcenter-cli
echo "Publishing $ipaPath to App Center"
appcenter distribute release \
--group Collaborators \
--file $ARTIFACT_PATH \
--release-notes 'App submission via Codemagic' \
--app $ORGANIZATION_NAME/$APP_CENTER_APP_NAME \
--token $APP_CENTER_TOKEN \