File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -53,22 +53,31 @@ jobs:
5353 working-directory : ./example
5454 id : expo
5555 run : echo "EXPO_CONFIG=$(npx expo config --json)" >> $GITHUB_OUTPUT
56+
57+ - name : Get branch info from EAS
58+ working-directory : ./example
59+ id : eas
60+ run : |
61+ branch=$(eas branch:view pr-${{ github.event.number }} --json --non-interactive)
62+ echo "BRANCH_INFO=$branch" >> $GITHUB_OUTPUT
5663
5764 - name : Comment on PR
5865 uses : actions/github-script@v7
5966 with :
6067 github-token : ${{ secrets.GITHUB_TOKEN }}
6168 script : |
6269 const config = JSON.parse('${{ steps.expo.outputs.EXPO_CONFIG }}');
70+ const branch = JSON.parse('${{ steps.eas.outputs.BRANCH_INFO }}';
71+
72+ const channel = 'pr-${{ github.event.number }}';
6373
6474 const { sdkVersion } = config;
6575 const { projectId } = config.extra.eas;
66-
67- const channel = 'pr-${{ github.event.number }}';
76+ const { id } = branch;
6877
6978 const url = `https://expo.dev/@react-native-paper/react-native-paper-example?serviceType=eas&distribution=expo-go&scheme=exp+react-native-paper-example&channel=${channel}&sdkVersion=${sdkVersion}`;
7079 const body = `The mobile version of example app from this branch is ready! You can [see it here.](${url})
71- <a href="${url}"><img src="https://qr.expo.dev/eas-update?appScheme=exp& projectId=${projectId}&channel=${channel}& runtimeVersion=exposdk:${sdkVersion}&host=u.expo.dev " height="200px" width="200px"></a>
80+ <a href="${url}"><img src="https://qr.expo.dev/eas-update?projectId=${projectId}&runtimeVersion=exposdk:${sdkVersion}&branchId=${id} " height="200px" width="200px"></a>
7281 `;
7382
7483 const comments = await github.rest.issues.listComments({
You can’t perform that action at this time.
0 commit comments