Skip to content

Instantly share code, notes, and snippets.

View aChase55's full-sized avatar

Alex Chase aChase55

  • Los Angeles
View GitHub Profile
SCHEME="Whatnot"
APP_ICON_NAME=AppIcon
SWIFT_ACTIVE_COMPILATION_CONDITIONS="\$(inherited)"
if [[ "$BUILD_CONFIGURATION" != "Release" ]]; then
APP_ICON_NAME=AppIcon-$BUILD_CONFIGURATION
SWIFT_ACTIVE_COMPILATION_CONDITIONS="\$(inherited) INTERNAL"
Fi
ARCHIVE_NAME="$SCHEME.xcarchive"
BUILD_PATH=$PWD/build/
ARCHIVE_PATH=$BUILD_PATH"$ARCHIVE_NAME"
xcodebuild \
-project Whatnot.xcodeproj \
-scheme "$SCHEME" \
-configuration "Release" \
-destination "generic/platform=iOS" \
archive -archivePath "$ARCHIVE_PATH" \
SWIFT_ACTIVE_COMPILATION_CONDITIONS=$SWIFT_ACTIVE_COMPILATION_CONDITIONS \
CODE_SIGN_STYLE=Manual \
WN_APP_ICON=$APP_ICON_NAME \
WN_BUILD_NUMBER=$BUILD_NUMBER \
echo "Export Build" $BUILD_PATH
xcodebuild -exportArchive \
-archivePath "$ARCHIVE_PATH" \
-exportPath "$BUILD_PATH" \
-exportOptionsPlist $PWD/ExportOptions.plist \
| xcpretty
- name: Upload Build
id: build-upload
uses: nick-invision/retry@v2
with:
timeout_minutes: 15
max_attempts: 5
retry_wait_seconds: 120
retry_on: error
command: ./scripts/build-upload.sh
env: