-
Notifications
You must be signed in to change notification settings - Fork 0
107 lines (93 loc) · 3.05 KB
/
Copy pathtestflight.yml
File metadata and controls
107 lines (93 loc) · 3.05 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: TestFlight
on:
workflow_dispatch:
inputs:
changelog:
description: "Changelog for this TestFlight build"
required: true
type: string
concurrency:
group: testflight-release
cancel-in-progress: false
jobs:
testflight:
name: Upload to TestFlight
runs-on: macos-26
timeout-minutes: 90
permissions:
contents: read
env:
APPLE_DEVELOPER_TEAM_ID: ${{ secrets.APPLE_DEVELOPER_TEAM_ID }}
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }}
APP_STORE_CONNECT_KEY_ID: ${{ secrets.APP_STORE_CONNECT_KEY_ID }}
APP_STORE_CONNECT_PRIVATE_KEY: ${{ secrets.APP_STORE_CONNECT_PRIVATE_KEY }}
TEMPLATE_APP_SENTRY_DSN: ${{ secrets.TEMPLATE_APP_SENTRY_DSN }}
TEMPLATE_APP_TELEMETRY_APP_ID: ${{ secrets.TEMPLATE_APP_TELEMETRY_APP_ID }}
MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_GIT_BRANCH: ${{ secrets.MATCH_GIT_BRANCH }}
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
FASTLANE_SKIP_UPDATE_CHECK: "1"
CI: "1"
steps:
- name: Print release context
run: |
echo "Workflow: TestFlight"
echo "Branch: ${GITHUB_REF_NAME}"
echo "Actor: ${GITHUB_ACTOR}"
- name: Validate release branch
run: |
if [[ "${GITHUB_REF_NAME}" != release/* ]]; then
echo "ERROR: This workflow may only run on release/* branches."
echo "Current branch: ${GITHUB_REF_NAME}"
exit 1
fi
shell: bash
- name: Validate changelog
run: |
if [[ -z "${{ inputs.changelog }}" ]]; then
echo "ERROR: changelog is required."
exit 1
fi
shell: bash
- name: Checkout
uses: actions/checkout@v6
- name: Select Xcode 26.4
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "26.4"
- name: Validate release secrets
run: |
missing=()
required=(
APPLE_DEVELOPER_TEAM_ID
APP_STORE_CONNECT_ISSUER_ID
APP_STORE_CONNECT_KEY_ID
APP_STORE_CONNECT_PRIVATE_KEY
MATCH_GIT_URL
MATCH_PASSWORD
)
for name in "${required[@]}"; do
if [[ -z "${!name}" ]]; then
missing+=("$name")
fi
done
if (( ${#missing[@]} > 0 )); then
printf 'ERROR: Missing GitHub secrets: %s\n' "${missing[*]}" >&2
exit 1
fi
shell: bash
- name: Print Xcode version
run: |
xcodebuild -version
xcode-select -p
- name: Set up Ruby and Bundler
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.4"
bundler-cache: true
- name: Upload TestFlight build
run: |
echo "Starting explicit TestFlight upload from ${GITHUB_REF_NAME}."
bundle exec fastlane ios beta changelog:"${{ inputs.changelog }}"
shell: bash