···3940 # Validate the version if one is supplied. This should generally happen if the update is for a production client
41 - name: 🧐 Validate version
0042 if: ${{ inputs.runtimeVersion }}
43 run: |
44- if [ -z "${{ inputs.runtimeVersion }}" ]; then
45- [[ "${{ inputs.runtimeVersion }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && echo "Version is valid" || exit 1
46 fi
4748 - name: ⬇️ Checkout
···103104 # eas.json not used here, set EXPO_PUBLIC_ENV
105 - name: Env
000106 id: env
107 if: ${{ !steps.fingerprint.outputs.includes-changes }}
108 run: |
109 export json='${{ secrets.GOOGLE_SERVICES_TOKEN }}'
110 echo "${{ secrets.ENV_TOKEN }}" > .env
111- echo "EXPO_PUBLIC_ENV=${{ inputs.channel || 'testflight' }}" >> .env
112 echo "EXPO_PUBLIC_RELEASE_VERSION=$(jq -r '.version' package.json)" >> .env
113 echo "EXPO_PUBLIC_RELEASE_VERSION=$(jq -r '.version' package.json)" >> $GITHUB_OUTPUT
114 echo "EXPO_PUBLIC_BUNDLE_IDENTIFIER=$(git rev-parse HEAD)" >> .env
···145146 - name: ✏️ Write commit hash to cache
147 if: ${{ !steps.fingerprint.outputs.includes-changes }}
148- run: echo ${{ github.sha }} > most-recent-testflight-commit.txt
149150 # GitHub actions are horrible so let's just copy paste this in
151 buildIfNecessaryIOS:
···249250 - name: ✏️ Write commit hash to cache
251 if: ${{ inputs.channel == 'testflight' }}
252- run: echo ${{ github.sha }} > most-recent-testflight-commit.txt
00253254 buildIfNecessaryAndroid:
255 name: Build and Submit Android
···363 key: most-recent-testflight-commit
364365 - name: ✏️ Write commit hash to cache
00366 if: ${{ inputs.channel != 'testflight' && inputs.channel != 'production' }}
367- run: echo ${{ github.sha }} > most-recent-testflight-commit.txt
···3940 # Validate the version if one is supplied. This should generally happen if the update is for a production client
41 - name: 🧐 Validate version
42+ env:
43+ RUNTIME_VERSION: ${{ inputs.runtimeVersion }}
44 if: ${{ inputs.runtimeVersion }}
45 run: |
46+ if [ -z "$RUNTIME_VERSION" ]; then
47+ [[ "$RUNTIME_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && echo "Version is valid" || exit 1
48 fi
4950 - name: ⬇️ Checkout
···105106 # eas.json not used here, set EXPO_PUBLIC_ENV
107 - name: Env
108+ env:
109+ CHANNEL: ${{ inputs.channel || 'testflight' }}
110+ GITHUB_SHA: ${{ github.sha }}
111 id: env
112 if: ${{ !steps.fingerprint.outputs.includes-changes }}
113 run: |
114 export json='${{ secrets.GOOGLE_SERVICES_TOKEN }}'
115 echo "${{ secrets.ENV_TOKEN }}" > .env
116+ echo "EXPO_PUBLIC_ENV=$CHANNEL" >> .env
117 echo "EXPO_PUBLIC_RELEASE_VERSION=$(jq -r '.version' package.json)" >> .env
118 echo "EXPO_PUBLIC_RELEASE_VERSION=$(jq -r '.version' package.json)" >> $GITHUB_OUTPUT
119 echo "EXPO_PUBLIC_BUNDLE_IDENTIFIER=$(git rev-parse HEAD)" >> .env
···150151 - name: ✏️ Write commit hash to cache
152 if: ${{ !steps.fingerprint.outputs.includes-changes }}
153+ run: echo $GITHUB_SHA > most-recent-testflight-commit.txt
154155 # GitHub actions are horrible so let's just copy paste this in
156 buildIfNecessaryIOS:
···254255 - name: ✏️ Write commit hash to cache
256 if: ${{ inputs.channel == 'testflight' }}
257+ env:
258+ GITHUB_SHA: ${{ github.sha }}
259+ run: echo $GITHUB_SHA > most-recent-testflight-commit.txt
260261 buildIfNecessaryAndroid:
262 name: Build and Submit Android
···370 key: most-recent-testflight-commit
371372 - name: ✏️ Write commit hash to cache
373+ env:
374+ GITHUB_SHA: ${{ github.sha }}
375 if: ${{ inputs.channel != 'testflight' && inputs.channel != 'production' }}
376+ run: echo $GITHUB_SHA > most-recent-testflight-commit.txt
+7-3
.github/workflows/pull-request-comment.yml
···32 fi
333435- if [[ "${{ github.event.comment.body }}" == *"ota"* ]]; then
36 has_ota=true
37 else
38 has_ota=false
···7576 steps:
77 - name: Get PR HEAD SHA
0078 id: pr-info
79 uses: actions/github-script@v7
80 with:
···82 const pr = await github.rest.pulls.get({
83 owner: context.repo.owner,
84 repo: context.repo.repo,
85- pull_number: ${{ github.event.issue.number }}
86 });
8788 console.log(`PR HEAD SHA: ${pr.data.head.sha}`);
···184185 - name: 💬 Drop a comment
186 uses: marocchino/sticky-pull-request-comment@v2
00187 with:
188 header: pull-request-eas-build-${{ steps.pr-info.outputs.head-sha }}
189 number: ${{ github.event.issue.number }}
190 message: |
191 Your requested OTA deployment was successful! You may now apply it by either scanning the QR code or opening the deep link below in your browser:
192193- <img src="https://bsky-qr.vercel.app?channel=pull-request-${{ github.event.issue.number }}" width=300 height=300>
194195 `bluesky://intent/apply-ota?channel=pull-request-${{ github.event.issue.number }}`
196 ---
···32 fi
333435+ if [[ "$COMMENT" == *"ota"* ]]; then
36 has_ota=true
37 else
38 has_ota=false
···7576 steps:
77 - name: Get PR HEAD SHA
78+ env:
79+ ISSUE_NUMBER: ${{ github.event.issue.number }}
80 id: pr-info
81 uses: actions/github-script@v7
82 with:
···84 const pr = await github.rest.pulls.get({
85 owner: context.repo.owner,
86 repo: context.repo.repo,
87+ pull_number: process.env.ISSUE_NUMBER,
88 });
8990 console.log(`PR HEAD SHA: ${pr.data.head.sha}`);
···186187 - name: 💬 Drop a comment
188 uses: marocchino/sticky-pull-request-comment@v2
189+ env:
190+ ISSUE_NUMBER: ${{ github.event.issue.number }}
191 with:
192 header: pull-request-eas-build-${{ steps.pr-info.outputs.head-sha }}
193 number: ${{ github.event.issue.number }}
194 message: |
195 Your requested OTA deployment was successful! You may now apply it by either scanning the QR code or opening the deep link below in your browser:
196197+ <img src="https://bsky-qr.vercel.app?channel=pull-request-$ISSUE_NUMBER" width=300 height=300>
198199 `bluesky://intent/apply-ota?channel=pull-request-${{ github.event.issue.number }}`
200 ---
+11-4
.github/workflows/pull-request-commit.yml
···35 cache: yarn
3637 - name: Ensure tracking relevant branches and checkout base
00038 run: |
39- git checkout ${{ github.head_ref }}
40- git checkout ${{ github.base_ref }}
4142 - name: Get the base commit
43 id: base-commit
44- run: echo base-commit=$(git log -n 1 ${{ github.base_ref }} --pretty=format:'%H') >> "$GITHUB_OUTPUT"
004546 - name: Merge PR commit
0047 run: |
48 # Have to set a git config for the merge to work
49 git config --global user.email "github-actions[bot]@users.noreply.github.com"
50 git config --global user.name "github-actions[bot]"
51- git merge --no-edit ${{ github.head_ref }}
52 yarn install
53 yarn intl:build
54
···35 cache: yarn
3637 - name: Ensure tracking relevant branches and checkout base
38+ env:
39+ HEAD_REF: ${{ github.head_ref }}
40+ BASE_REF: ${{ github.base_ref }}
41 run: |
42+ git checkout $HEAD_REF
43+ git checkout $BASE_REF
4445 - name: Get the base commit
46 id: base-commit
47+ env:
48+ BASE_REF: ${{ github.base_ref }}
49+ run: echo base-commit=$(git log -n 1 $BASE_REF --pretty=format:'%H') >> "$GITHUB_OUTPUT"
5051 - name: Merge PR commit
52+ env:
53+ HEAD_REF: ${{ github.head_ref }}
54 run: |
55 # Have to set a git config for the merge to work
56 git config --global user.email "github-actions[bot]@users.noreply.github.com"
57 git config --global user.name "github-actions[bot]"
58+ git merge --no-edit $HEAD_REF
59 yarn install
60 yarn intl:build
61