Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ios_sentry_upload_adhoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

jobs:
build_distribution:
if: github.event_name != 'pull_request' || github.head_ref != 'codex/test-sentry-cli-dsym-e2e'
runs-on: macos-26

defaults:
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/ios_sentry_upload_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,19 @@ jobs:
with:
fetch-depth: 0

- name: Checkout sentry-cli
uses: actions/checkout@v6
with:
repository: getsentry/sentry-cli
ref: c596fcddd616867b6c6cdfa11f9853dc889a585a
path: sentry-cli

- name: Build sentry-cli
working-directory: ${{ github.workspace }}/sentry-cli
run: |
rustup target add aarch64-apple-darwin
cargo build --release --locked --target aarch64-apple-darwin

- name: Set up Ruby env
uses: ruby/setup-ruby@v1
with:
Expand All @@ -43,6 +56,9 @@ jobs:
ASC_KEY: ${{ secrets.ASC_PRIVATE_KEY }}
SIGNING_KEY_PASSWORD: ${{ secrets.IOS_DIST_SIGNING_KEY_PASSWORD }}
SIGNING_KEY_FILE_PATH: signing-cert.p12
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_SENTRY_AUTH_TOKEN }}
SENTRY_CLI_PATH: ${{ github.workspace }}/sentry-cli/target/aarch64-apple-darwin/release/sentry-cli
SENTRY_LOG_LEVEL: debug
SENTRY_SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_SENTRY_AUTH_TOKEN }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
CONFIGURATION: Release
3 changes: 2 additions & 1 deletion .github/workflows/ios_sentry_upload_snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
# Build the snapshot test bundle once on a single runner, then share the
# products with downstream simulator jobs via an artifact.
build_for_testing:
if: github.event_name != 'pull_request' || github.head_ref != 'codex/test-sentry-cli-dsym-e2e'
runs-on: macos-26

env:
Expand Down Expand Up @@ -209,4 +210,4 @@ jobs:
- name: Upload snapshots to Sentry
env:
SENTRY_SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_SENTRY_AUTH_TOKEN }}
run: bundle exec fastlane ios upload_sentry_snapshots path:"${SNAPSHOT_UPLOAD_BASE_DIR}"
run: bundle exec fastlane ios upload_sentry_snapshots path:"${SNAPSHOT_UPLOAD_BASE_DIR}"
1 change: 1 addition & 0 deletions .github/workflows/ios_sentry_upload_swift_snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:

jobs:
upload_sentry_swift_snapshots:
if: github.event_name != 'pull_request' || github.head_ref != 'codex/test-sentry-cli-dsym-e2e'
runs-on: macos-26

defaults:
Expand Down
12 changes: 9 additions & 3 deletions ios/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
GIT
remote: https://github.com/getsentry/sentry-fastlane-plugin.git
revision: 0fe84e64455d7f6643976368c04a5496b1a3f263
branch: codex/ipa-dsym-build-upload
specs:
fastlane-plugin-sentry (2.6.2)
os (~> 1.1, >= 1.1.4)

GEM
remote: https://rubygems.org/
specs:
Expand Down Expand Up @@ -123,8 +131,6 @@ GEM
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.4.1)
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
fastlane-plugin-sentry (2.5.2)
os (~> 1.1, >= 1.1.4)
fastlane-sirp (1.1.0)
gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.102.0)
Expand Down Expand Up @@ -242,7 +248,7 @@ PLATFORMS

DEPENDENCIES
fastlane
fastlane-plugin-sentry (>= 2.5.1, < 3.0.0)
fastlane-plugin-sentry (>= 2.5.1, < 3.0.0)!
xcpretty

BUNDLED WITH
Expand Down
46 changes: 34 additions & 12 deletions ios/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -186,19 +186,41 @@ platform :ios do
prepare_signing
build_app_for_scheme
ipa_path = export_thinned_size_analysis_ipa
xcarchive_path = lane_context[SharedValues::XCODEBUILD_ARCHIVE]
replace_xcarchive_app_with_ipa(
ipa_path: ipa_path,
xcarchive_path: xcarchive_path
)
sentry_upload_build(
auth_token: ENV['SENTRY_SENTRY_AUTH_TOKEN'],
org_slug: 'sentry',
project_slug: 'hackernews-ios',
xcarchive_path: xcarchive_path,
build_configuration: 'Release',
log_level: 'debug'
xcarchive_path = File.expand_path(
lane_context[SharedValues::XCODEBUILD_ARCHIVE],
File.expand_path('..', __dir__)
)

if ENV['SENTRY_CLI_PATH']
dsym_path = File.join(xcarchive_path, 'dSYMs')
UI.important(
"Testing IPA+dSYM upload through fastlane-plugin-sentry with #{ENV.fetch('SENTRY_CLI_PATH')}: " \
"IPA=#{ipa_path}, dSYMs=#{dsym_path}"
)
sentry_upload_build(
auth_token: ENV['SENTRY_SENTRY_AUTH_TOKEN'],
org_slug: 'sentry',
project_slug: 'hackernews-ios',
ipa_path: ipa_path,
dsym_path: dsym_path,
sentry_cli_path: ENV.fetch('SENTRY_CLI_PATH'),
build_configuration: 'Release-dsym-e2e',
log_level: 'debug'
)
else
replace_xcarchive_app_with_ipa(
ipa_path: ipa_path,
xcarchive_path: xcarchive_path
)
sentry_upload_build(
auth_token: ENV['SENTRY_SENTRY_AUTH_TOKEN'],
org_slug: 'sentry',
project_slug: 'hackernews-ios',
xcarchive_path: xcarchive_path,
build_configuration: 'Release',
log_level: 'debug'
)
end
end

desc 'Export a thinned Release IPA for Sentry Size Analysis'
Expand Down
4 changes: 3 additions & 1 deletion ios/fastlane/Pluginfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
#
# Ensure this file is checked in to source control!

gem 'fastlane-plugin-sentry', '>= 2.5.1', '< 3.0.0'
gem 'fastlane-plugin-sentry', '>= 2.5.1', '< 3.0.0',
git: 'https://github.com/getsentry/sentry-fastlane-plugin.git',
branch: 'codex/ipa-dsym-build-upload'