expo publish
Publish every branch to it’s own release channel automatically
Because i’m using Git Flow, the branch naming is feature/my-awesome-branch
. I can get the branch name with a built-in pipeline variable, but the /
after feature
doesn’t work with Expo release channel naming. You can’t have a /
in a release channel name..
[06:23:47] Release channel name can only contain lowercase letters, numbers and special characters . _ and -
${BITBUCKET_BRANCH}
, do some sed
magic to remove /
in the name, and voila! 1feature/*:
2 - step:
3 name: Publish to Expo
4 deployment: feature
5 caches:
6 - npm
7 script:
8 - unset NPM_CONFIG_USER
9 - npm ci
10 - npm install -g --unsafe-perm expo-cli
11 - expo login -u ${EXPO_USERNAME} -p ${EXPO_PASSWORD}
12 - RELEASE_CHANNEL_FEATURE=$(echo ${BITBUCKET_BRANCH} | sed 's|feature/|feature_|')
13 - expo publish --clear --release-channel ${RELEASE_CHANNEL_FEATURE} # RELEASE_CHANNEL is a based on branch name (feature/my-feature => feature_my-feature)