-
Notifications
You must be signed in to change notification settings - Fork 1
35 lines (35 loc) · 1.3 KB
/
preview.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Create preview
on: [pull_request]
jobs:
preview:
name: Create preview
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "18.x"
cache: "yarn"
- uses: expo/[email protected]
with:
expo-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Install dependencies
run: yarn
- name: Publish to Expo & create a QR code
uses: expo/expo-preview-action@v1
with:
channel: pr-${{ github.event.number }}
id: preview
- name: Comment deployment link
uses: unsplash/comment-on-pr@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
msg: >
You can [preview the PR here](${{ steps.preview.outputs.EXPO_QR_CODE_URL }}).<br><br>
<a href="${{ steps.publish.outputs.EXPO_QR_CODE_URL }}"><img src="${{ steps.preview.outputs.EXPO_QR_CODE_URL }}" height="512px" width="512px"></a>
<br><br>
QR code not working or need a different client? Try the QR code or deep link from the [project page](${{steps.preview.outputs.EXPO_PROJECT_URL}}).
<br><br>
${{ steps.publish.outputs.EXPO_NEW_BUILD_IS_REQUIRED_MESSAGE }}