Skip to content

Commit 179def6

Browse files
committed
chore: update preview qr code
1 parent 5f463b7 commit 179def6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/publish-each-pr.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,18 @@ jobs:
5959
with:
6060
github-token: ${{ secrets.GITHUB_TOKEN }}
6161
script: |
62+
const channel = 'pr-${{ github.event.number }}';
63+
6264
const config = JSON.parse('${{ steps.expo.outputs.EXPO_CONFIG }}');
65+
const branch = JSON.parse('$(eas branch:view ${{channel}} --json --non-interactive )')
6366
6467
const { sdkVersion } = config;
6568
const { projectId } = config.extra.eas;
66-
67-
const channel = 'pr-${{ github.event.number }}';
69+
const { id } = branch;
6870
6971
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}`;
7072
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>
73+
<a href="${url}"><img src="https://qr.expo.dev/eas-update?projectId=${projectId}&runtimeVersion=exposdk:${sdkVersion}&branchId=${id}" height="200px" width="200px"></a>
7274
`;
7375
7476
const comments = await github.rest.issues.listComments({

0 commit comments

Comments
 (0)