File tree 1 file changed +11
-3
lines changed
1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -53,22 +53,30 @@ jobs:
53
53
working-directory : ./example
54
54
id : expo
55
55
run : echo "EXPO_CONFIG=$(npx expo config --json)" >> $GITHUB_OUTPUT
56
+
57
+ - name : Get branch info from EAS
58
+ id : eas
59
+ run : |
60
+ branch = $(eas branch:view pr-${{ github.event.number }} --json --non-interactive)
61
+ echo "BRANCH_INFO=$branch" >> $GITHUB_OUTPUT
56
62
57
63
- name : Comment on PR
58
64
uses : actions/github-script@v7
59
65
with :
60
66
github-token : ${{ secrets.GITHUB_TOKEN }}
61
67
script : |
62
68
const config = JSON.parse('${{ steps.expo.outputs.EXPO_CONFIG }}');
69
+ const branch = JSON.parse('${{ steps.eas.outputs.BRANCH_INFO }}';
70
+
71
+ const channel = 'pr-${{ github.event.number }}';
63
72
64
73
const { sdkVersion } = config;
65
74
const { projectId } = config.extra.eas;
66
-
67
- const channel = 'pr-${{ github.event.number }}';
75
+ const { id } = branch;
68
76
69
77
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}`;
70
78
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>
79
+ <a href="${url}"><img src="https://qr.expo.dev/eas-update?projectId=${projectId}&runtimeVersion=exposdk:${sdkVersion}&branchId=${id} " height="200px" width="200px"></a>
72
80
`;
73
81
74
82
const comments = await github.rest.issues.listComments({
You can’t perform that action at this time.
0 commit comments