ci: install ios profiles by uuid
This commit is contained in:
@@ -173,9 +173,9 @@ jobs:
|
||||
security import "$cert_path" -P "$IOS_DISTRIBUTION_CERTIFICATE_PASSWORD" -A -t cert -f pkcs12 -k "$keychain_path"
|
||||
security list-keychain -d user -s "$keychain_path"
|
||||
|
||||
app_profile="$profiles_dir/openchamber-app.mobileprovision"
|
||||
widget_profile="$profiles_dir/openchamber-widget.mobileprovision"
|
||||
nse_profile="$profiles_dir/openchamber-notification-service.mobileprovision"
|
||||
app_profile="$RUNNER_TEMP/openchamber-app.mobileprovision"
|
||||
widget_profile="$RUNNER_TEMP/openchamber-widget.mobileprovision"
|
||||
nse_profile="$RUNNER_TEMP/openchamber-notification-service.mobileprovision"
|
||||
printf '%s' "$IOS_APP_PROFILE_BASE64" | base64 -D > "$app_profile"
|
||||
printf '%s' "$IOS_WIDGET_PROFILE_BASE64" | base64 -D > "$widget_profile"
|
||||
printf '%s' "$IOS_NSE_PROFILE_BASE64" | base64 -D > "$nse_profile"
|
||||
@@ -184,9 +184,17 @@ jobs:
|
||||
security cms -D -i "$1" > "$RUNNER_TEMP/profile.plist"
|
||||
/usr/libexec/PlistBuddy -c 'Print :UUID' "$RUNNER_TEMP/profile.plist"
|
||||
}
|
||||
echo "IOS_APP_PROFILE_UUID=$(profile_uuid "$app_profile")" >> "$GITHUB_ENV"
|
||||
echo "IOS_WIDGET_PROFILE_UUID=$(profile_uuid "$widget_profile")" >> "$GITHUB_ENV"
|
||||
echo "IOS_NSE_PROFILE_UUID=$(profile_uuid "$nse_profile")" >> "$GITHUB_ENV"
|
||||
install_profile() {
|
||||
local source_path="$1"
|
||||
local env_name="$2"
|
||||
local uuid
|
||||
uuid="$(profile_uuid "$source_path")"
|
||||
cp "$source_path" "$profiles_dir/$uuid.mobileprovision"
|
||||
echo "$env_name=$uuid" >> "$GITHUB_ENV"
|
||||
}
|
||||
install_profile "$app_profile" IOS_APP_PROFILE_UUID
|
||||
install_profile "$widget_profile" IOS_WIDGET_PROFILE_UUID
|
||||
install_profile "$nse_profile" IOS_NSE_PROFILE_UUID
|
||||
|
||||
- name: Prepare mobile assets
|
||||
run: bun run mobile:sync
|
||||
@@ -263,8 +271,6 @@ jobs:
|
||||
|
||||
- name: Archive iOS app
|
||||
shell: bash
|
||||
env:
|
||||
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
xcodebuild archive \
|
||||
@@ -273,9 +279,6 @@ jobs:
|
||||
-configuration Release \
|
||||
-destination 'generic/platform=iOS' \
|
||||
-archivePath "$RUNNER_TEMP/OpenChamber.xcarchive" \
|
||||
DEVELOPMENT_TEAM="$APPLE_TEAM_ID" \
|
||||
CODE_SIGN_STYLE=Manual \
|
||||
CODE_SIGN_IDENTITY="Apple Distribution" \
|
||||
"OTHER_CODE_SIGN_FLAGS=--keychain $RUNNER_TEMP/app-signing.keychain-db"
|
||||
working-directory: ${{ env.IOS_PROJECT_DIR }}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user