This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
Clean up Expo Update branches with Expo Workflows
Edit page
Learn how to delete Expo Update branches when GitHub branches are deleted using Expo Workflows.
You might publish updates to Expo Update branches named after GitHub branches, for example with eas update --auto, the update workflow job with branch: ${{ github.ref_name }}, or preview updates on every branch. When you do, deleting the GitHub branch leaves the Expo Update branch behind. This workflow cleans up the orphaned Expo Update branch when a Git branch is deleted.
Get started
3 requirements
3 requirements
1.
Your project needs to have Expo Update configured. You can set up your project with:
2.
Your Expo Services project must be linked to a GitHub repository. See Get started with Expo Workflows.
3.
Keep this workflow file on your repository's default branch. When a branch is deleted, Expo Workflows reads workflow configuration from the default branch HEAD, not from the deleted ref.
The following workflow deletes the Expo Update branch with the same name as the deleted GitHub branch:
How it works
on.ref_deleteruns when a GitHub branch matching the patterns is deleted. The example above triggers on all branches exceptmain.- The
branch-deletejob deletes the Expo Update branch named${{ github.ref_name }}, the same name as the deleted Git branch. - With the default
fail_on_missing: false, the job succeeds even if the Expo Update branch was already deleted or never existed.
Important notes
github.shais the default branch, not the deleted ref's last commit. See thegithubcontext reference for interpolation details onref_deleteruns.- Channel mappings block deletion: if a channel points to the Expo Update branch, deletion fails with an error about the channel mapping.
- Protect branches you never want cleaned up using negation patterns like
!mainor!release/**inon.ref_delete.branches.