-
Notifications
You must be signed in to change notification settings - Fork 4
64 lines (57 loc) · 1.69 KB
/
expo-publish.yml
File metadata and controls
64 lines (57 loc) · 1.69 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: EXPO Publish
on:
workflow_dispatch:
inputs:
branch:
description: EAS update branch
required: true
default: main
jobs:
publish:
runs-on: ubuntu-latest
env:
# Quieter deprecation noise for actions running on older Node until defaults switch to 24.
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup Node
uses: actions/setup-node@v5
with:
node-version: 22
cache: npm
cache-dependency-path: package-lock.json
- name: Install dependencies
run: npm ci
- name: Resolve target update branch
id: target
shell: bash
run: |
set -euo pipefail
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
target_branch="${{ inputs.branch }}"
else
target_branch="main"
fi
echo "branch=$target_branch" >> "$GITHUB_OUTPUT"
- name: Verify Expo auth
env:
EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}
shell: bash
run: |
set -euo pipefail
if [[ -z "${EXPO_TOKEN:-}" ]]; then
echo "::error::Add repository secret EXPO_TOKEN (Expo dashboard → Access tokens)."
exit 1
fi
npx eas-cli@latest whoami
- name: Publish OTA update
env:
EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}
shell: bash
run: |
set -euo pipefail
npx eas-cli@latest update \
--non-interactive \
--branch "${{ steps.target.outputs.branch }}" \
--message "CI publish ${GITHUB_SHA}"