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.
Complete YAML
Section titled “Complete YAML”name: Build with Artifactsplatform: iosenvironment: xcode: "16.4"
triggers: - push - pull_request
steps: - name: Build run: fastlane build
artifacts: - build/**/*.ipa - build/**/*.dSYMCommon Artifact Patterns
Section titled “Common Artifact Patterns”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/**Fastlane Build Artifacts
Section titled “Fastlane Build Artifacts”name: Fastlane with Artifactsplatform: iosenvironment: xcode: "16.4"
triggers: - push
steps: - name: Build and export run: fastlane build
artifacts: - fastlane/builds/**/*.ipa - fastlane/builds/**/*.dSYM - fastlane/report.xmlXcodebuild Archive Artifacts
Section titled “Xcodebuild Archive Artifacts”name: Xcodebuild Archiveplatform: iosenvironment: 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/**/*.dSYMKey Points
Section titled “Key Points”- 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
Artifact Retention by Plan
Section titled “Artifact Retention by Plan”| Plan | Retention |
|---|---|
| Free | No retention (deleted after job cleanup) |
| PAYG | 7 days |
| Pro | 30 days |
| Business | 90 days |
Test Result Artifacts
Section titled “Test Result Artifacts”name: Tests with Result Bundleplatform: iosenvironment: 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/**Build Logs and Reports
Section titled “Build Logs and Reports”name: Build with Logsplatform: iosenvironment: 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/**/*.dSYMCode Coverage Reports
Section titled “Code Coverage Reports”name: Tests with Coverageplatform: iosenvironment: 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/**/*.profdataBest Practices
Section titled “Best Practices”- Be specific with glob patterns to avoid large uploads
- Exclude unnecessary files like build logs for passing jobs
- Use appropriate patterns for your build system (Fastlane, xcodebuild, etc.)
- Check retention policy before relying on artifacts for long-term storage
- Name artifacts clearly to identify their contents easily