Branchwell

Jobley / app · jobley.ai / .github / workflows / testflight.yml

Raw 2.5 KB on a698b1d1990e3dd0f04a257534b232ac0b1cf6c7
1name: TestFlight
2# Builds the iPhone app and uploads it to TestFlight (internal group "Jobley Internal").
3# Same script as a local upload: scripts/release-ios.sh. See RELEASING.md for the secrets.
4on:
5 workflow_dispatch:
6 inputs:
7 build:
8 description: Build number (empty = one more than App Store Connect's newest)
9 required: false
10permissions:
11 contents: read
12concurrency:
13 group: testflight
14 cancel-in-progress: false
15jobs:
16 upload:
17 runs-on: xcode-27
18 timeout-minutes: 75
19 steps:
20 - uses: actions/checkout@v5
21 with:
22 ref: main
23 - name: Select Xcode 27.2
24 run: sudo xcode-select -s /Applications/Xcode_27.2.app
25 - name: Install XcodeGen
26 run: brew list xcodegen >/dev/null 2>&1 || brew install xcodegen
27 - name: Import the Apple Distribution certificate
28 env:
29 DISTRIBUTION_P12_BASE64: ${{ secrets.DISTRIBUTION_P12_BASE64 }}
30 DISTRIBUTION_P12_PASSWORD: ${{ secrets.DISTRIBUTION_P12_PASSWORD }}
31 run: |
32 keychain="$RUNNER_TEMP/release.keychain-db"
33 password="$(uuidgen)"
34 security create-keychain -p "$password" "$keychain"
35 security set-keychain-settings -lut 3600 "$keychain"
36 security unlock-keychain -p "$password" "$keychain"
37 echo "$DISTRIBUTION_P12_BASE64" | base64 --decode > "$RUNNER_TEMP/distribution.p12"
38 security import "$RUNNER_TEMP/distribution.p12" -k "$keychain" -P "$DISTRIBUTION_P12_PASSWORD" -T /usr/bin/codesign -T /usr/bin/security
39 security set-key-partition-list -S apple-tool:,apple: -s -k "$password" "$keychain" > /dev/null
40 security list-keychains -d user -s "$keychain" login.keychain-db
41 rm "$RUNNER_TEMP/distribution.p12"
42 - name: Write the App Store Connect upload key
43 env:
44 ASC_UPLOAD_KEY: ${{ secrets.ASC_UPLOAD_KEY }}
45 run: |
46 umask 077
47 printf '%s\n' "$ASC_UPLOAD_KEY" > "$RUNNER_TEMP/AuthKey.p8"
48 - name: Upload
49 env:
50 JOBLEY_RELEASE_DIR: ${{ runner.temp }}/jobley-release
51 APPLE_API_KEY_PATH: ${{ runner.temp }}/AuthKey.p8
52 APPLE_API_KEY_ID: ${{ secrets.ASC_UPLOAD_KEY_ID }}
53 APPLE_API_ISSUER: ${{ secrets.ASC_UPLOAD_ISSUER }}
54 BUILD: ${{ inputs.build }}
55 run: scripts/release-ios.sh ${BUILD:+--build "$BUILD"}
56 - name: Remove signing material
57 if: always()
58 run: |
59 security delete-keychain "$RUNNER_TEMP/release.keychain-db" || true
60 rm -f "$RUNNER_TEMP/AuthKey.p8"