Add standalone TestFlight retry job
Some checks failed
Build Site / Next.js Build (push) Waiting to run
Lint Governance / BEP Metadata (push) Waiting to run
Build Rust / Cargo Test (push) Has been cancelled

This commit is contained in:
Conrad Kramer 2026-06-07 19:01:31 -07:00
parent a075f5ca34
commit 86a60371d6
4 changed files with 101 additions and 87 deletions

View file

@ -222,7 +222,7 @@ jobs:
release-ios-testflight:
name: Release (TestFlight iOS Testers)
needs: upload-app-store
if: ${{ always() && (github.event.inputs.upload_app_store == 'true' || github.event.inputs.distribute_testflight == 'true') && (github.event.inputs.upload_app_store != 'true' || needs.upload-app-store.result == 'success') }}
if: ${{ github.event.inputs.upload_app_store == 'true' }}
runs-on: namespace-profile-linux-medium
steps:
- name: Checkout
@ -256,55 +256,45 @@ jobs:
TESTFLIGHT_GROUPS: ${{ github.event.inputs.testflight_groups || '' }}
TESTFLIGHT_INTERNAL_GROUP: Internal
IOS_USES_NON_EXEMPT_ENCRYPTION: ${{ github.event.inputs.ios_uses_non_exempt_encryption || 'false' }}
run: |
set -euo pipefail
Scripts/ci/check-release-config.sh app-store
api_key_json="$(mktemp "${RUNNER_TEMP:-/tmp}/burrow-appstore-api-key.XXXXXX.json")"
key_file="$(mktemp "${RUNNER_TEMP:-/tmp}/burrow-appstore-key.XXXXXX.p8")"
if [[ -n "${ASC_API_KEY_PATH:-}" && -f "${ASC_API_KEY_PATH:-}" ]]; then
cp "$ASC_API_KEY_PATH" "$key_file"
else
printf '%s' "$ASC_API_KEY_BASE64" | base64 --decode > "$key_file"
fi
KEY_FILE="$key_file" python3 -c 'import json, os, pathlib; print(json.dumps({"key_id": os.environ["ASC_API_KEY_ID"], "issuer_id": os.environ["ASC_API_ISSUER_ID"], "key": pathlib.Path(os.environ["KEY_FILE"]).read_text(), "duration": 1200, "in_house": False}))' > "$api_key_json"
run: Scripts/ci/distribute-testflight.sh
distribute_external="${TESTFLIGHT_DISTRIBUTE_EXTERNAL:-false}"
if [[ -z "$distribute_external" ]]; then
distribute_external="false"
fi
uses_non_exempt="${IOS_USES_NON_EXEMPT_ENCRYPTION:-false}"
if [[ -z "$uses_non_exempt" ]]; then
uses_non_exempt="false"
fi
wait_processing_timeout="${TESTFLIGHT_WAIT_PROCESSING_TIMEOUT_SECONDS:-7200}"
case "$wait_processing_timeout" in
""|*[!0-9]*)
echo "::error ::TESTFLIGHT_WAIT_PROCESSING_TIMEOUT_SECONDS must be an integer number of seconds." >&2
exit 1
;;
esac
distribute-ios-testflight:
name: Distribute (TestFlight iOS Testers)
if: ${{ github.event.inputs.upload_app_store != 'true' && github.event.inputs.distribute_testflight == 'true' }}
runs-on: namespace-profile-linux-medium
steps:
- name: Checkout
uses: https://code.forgejo.org/actions/checkout@v4
with:
token: ${{ github.token }}
fetch-depth: 0
args=(
run pilot
"api_key_path:${api_key_json}"
"app_identifier:${BURROW_APPLE_BUNDLE_ID:-net.burrow.app}"
"app_platform:ios"
"distribute_only:true"
"build_number:${BUILD_NUMBER}"
"wait_processing_interval:30"
"wait_processing_timeout_duration:${wait_processing_timeout}"
"distribute_external:${distribute_external}"
"uses_non_exempt_encryption:${uses_non_exempt}"
)
- name: Ensure Nix
shell: bash
run: bash Scripts/ci/ensure-nix.sh
if [[ -n "${TESTFLIGHT_GROUPS}" ]]; then
args+=("groups:${TESTFLIGHT_GROUPS}")
elif [[ "$distribute_external" != "true" && -n "${TESTFLIGHT_INTERNAL_GROUP:-}" ]]; then
args+=("groups:${TESTFLIGHT_INTERNAL_GROUP}")
fi
- name: Configure Age
shell: bash
env:
AGE_FORGE_SSH_KEY: ${{ secrets.AGE_FORGE_SSH_KEY }}
run: Scripts/resolve-age-identity.sh >> "$GITHUB_ENV"
nix run nixpkgs#fastlane -- "${args[@]}"
rm -f "$api_key_json" "$key_file"
- name: Decrypt Release Secrets
uses: ./.forgejo/actions/decrypt-release-secrets
- name: Validate App Store Credentials
shell: bash
run: Scripts/ci/check-release-config.sh app-store
- name: Distribute iOS Build To TestFlight
shell: bash
env:
BUILD_NUMBER: ${{ github.event.inputs.build_number }}
TESTFLIGHT_DISTRIBUTE_EXTERNAL: ${{ github.event.inputs.testflight_distribute_external || 'false' }}
TESTFLIGHT_GROUPS: ${{ github.event.inputs.testflight_groups || '' }}
TESTFLIGHT_INTERNAL_GROUP: Internal
IOS_USES_NON_EXEMPT_ENCRYPTION: ${{ github.event.inputs.ios_uses_non_exempt_encryption || 'false' }}
run: Scripts/ci/distribute-testflight.sh
upload-sparkle:
name: Upload (Sparkle)