Step 1 / 4
Authenticate CI with a token
In the Shorebird console create a service account and an API key, then save it in a Codemagic environment group as SHOREBIRD_TOKEN. The CLI reads it automatically, so no interactive login is needed.
Run Shorebird releases and patches from Codemagic with a service-account token, shared YAML anchors and workflow inputs.
1definitions:2 environment:3 shared_env: &shared_env4 flutter: 3.50.15 groups:6 - shorebird # SHOREBIRD_TOKEN from a service account7 - play_store # GCLOUD_SERVICE_ACCOUNT_CREDENTIALS8 scripts:9 - &shorebird_install10 name: Install Shorebird11 script: |12 curl -fsSL https://shorebird.dev/install.sh | bash13 echo PATH="$HOME/.shorebird/bin:$PATH" >> $CM_ENV1415workflows:16 release-android:17 environment:18 <<: *shared_env19 android_signing:20 - android_keystore21 scripts:22 - *shorebird_install23 - name: Shorebird release24 script: shorebird release android25 publishing:26 google_play:27 credentials: $GCLOUD_SERVICE_ACCOUNT_CREDENTIALS28 track: internal2930 patch-android:31 environment:32 <<: *shared_env33 android_signing:34 - android_keystore35 inputs:36 release_version:37 description: The release version to patch38 scripts:39 - *shorebird_install40 - name: Shorebird patch41 script: |42 shorebird patch android \43 --release-version=${{ inputs.release_version }} \44 --track=stable
In the Shorebird console create a service account and an API key, then save it in a Codemagic environment group as SHOREBIRD_TOKEN. The CLI reads it automatically, so no interactive login is needed.