Skip to content

Build Artifacts

Build artifacts are output files from your pipeline that RunnerHub stores and makes available for download. This recipe shows how to collect IPAs, dSYMs, app bundles, and other build artifacts.

name: Build with Artifacts
platform: ios
environment:
xcode: "16.4"
triggers:
- push
- pull_request
steps:
- name: Build
run: fastlane build
artifacts:
- build/**/*.ipa
- build/**/*.dSYM
artifacts:
# iOS build outputs
- build/**/*.ipa
- build/**/*.app
- build/**/*.xcarchive
- build/**/*.dSYM
# Build logs and reports
- build/logs/**
- build/test-results/**
# Derived data
- build/DerivedData/Build/Products/**
name: Fastlane with Artifacts
platform: ios
environment:
xcode: "16.4"
triggers:
- push
steps:
- name: Build and export
run: fastlane build
artifacts:
- fastlane/builds/**/*.ipa
- fastlane/builds/**/*.dSYM
- fastlane/report.xml
name: Xcodebuild Archive
platform: ios
environment:
xcode: "16.4"
triggers:
- push
steps:
- name: Install pods
run: pod install
- name: Archive app
run: |
xcodebuild \
-workspace MyApp.xcworkspace \
-scheme MyApp \
-configuration Release \
-archivePath build/MyApp.xcarchive \
archive
artifacts:
- build/MyApp.xcarchive/**
- build/**/*.ipa
- build/**/*.dSYM
  • Glob Patterns: Use ** for recursive directories and * for wildcards
  • Multiple Patterns: List each pattern on a separate line
  • Preservation: Artifacts persist after the job finishes, even if the job fails
  • Retention Policy: Artifact retention depends on your pricing plan
PlanRetention
FreeNo retention (deleted after job cleanup)
PAYG7 days
Pro30 days
Business90 days
name: Tests with Result Bundle
platform: ios
environment:
xcode: "16.4"
triggers:
- push
- pull_request
steps:
- name: Install pods
run: pod install
- name: Run tests
run: |
xcodebuild \
-workspace MyApp.xcworkspace \
-scheme MyApp \
-destination 'platform=iOS Simulator,name=iPhone 15' \
-resultBundlePath build/test-results \
test
artifacts:
- build/test-results/**
name: Build with Logs
platform: ios
environment:
xcode: "16.4"
triggers:
- push
steps:
- name: Build
run: |
xcodebuild \
-workspace MyApp.xcworkspace \
-scheme MyApp \
build-for-testing \
2>&1 | tee build/xcodebuild.log
artifacts:
- build/xcodebuild.log
- build/**/*.ipa
- build/**/*.dSYM
name: Tests with Coverage
platform: ios
environment:
xcode: "16.4"
triggers:
- push
- pull_request
steps:
- name: Install pods
run: pod install
- name: Run tests with coverage
run: |
xcodebuild \
-workspace MyApp.xcworkspace \
-scheme MyApp \
-destination 'platform=iOS Simulator,name=iPhone 15' \
-enableCodeCoverage YES \
-resultBundlePath build/test-results \
test
artifacts:
- build/test-results/**
- build/DerivedData/Build/Products/**/*.profdata
  1. Be specific with glob patterns to avoid large uploads
  2. Exclude unnecessary files like build logs for passing jobs
  3. Use appropriate patterns for your build system (Fastlane, xcodebuild, etc.)
  4. Check retention policy before relying on artifacts for long-term storage
  5. Name artifacts clearly to identify their contents easily