-
Notifications
You must be signed in to change notification settings - Fork 27
72 lines (62 loc) · 1.78 KB
/
Copy pathios-testflight.yml
File metadata and controls
72 lines (62 loc) · 1.78 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
65
66
67
68
69
70
71
72
name: iOS TestFlight Deploy
permissions:
contents: read
on:
push:
branches: [main]
paths: ['app/**']
workflow_dispatch:
inputs:
build_id:
description: 'Existing EAS build ID to submit without rebuilding'
required: false
type: string
jobs:
build-and-submit:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./app
steps:
- name: Setup repo
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4.0.2
with:
node-version: 20.x
cache: 'npm'
cache-dependency-path: ./app/package-lock.json
- name: Setup Expo
uses: expo/expo-github-action@v8
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Install dependencies
run: npm ci
- name: Write and validate ASC API key
env:
ASC_API_KEY_P8: ${{ secrets.ASC_API_KEY_P8 }}
run: |
set -euo pipefail
if [ -z "$ASC_API_KEY_P8" ]; then
echo "ASC_API_KEY_P8 is not configured"
exit 1
fi
printf '%s\n' "$ASC_API_KEY_P8" > asc-api-key.p8
chmod 600 asc-api-key.p8
openssl pkey -in asc-api-key.p8 -noout -check
- name: Build and submit to TestFlight
if: inputs.build_id == ''
run: eas build --platform ios --profile testflight --auto-submit --non-interactive
- name: Submit existing build to TestFlight
if: inputs.build_id != ''
env:
EAS_BUILD_ID: ${{ inputs.build_id }}
run: >-
eas build:submit
--platform ios
--profile testflight
--id "$EAS_BUILD_ID"
--non-interactive
--wait