Add Sentry dsym upload step for release builds

This commit is contained in:
Stefan Ceriu 2022-06-10 14:11:33 +03:00
parent 1be403e60a
commit c96ee095d0
3 changed files with 19 additions and 1 deletions

View File

@ -115,6 +115,7 @@ GEM
fastlane-plugin-brew (0.1.1)
fastlane-plugin-diawi (2.1.0)
rest-client (>= 2.0.0)
fastlane-plugin-sentry (1.12.0)
fastlane-plugin-xcodegen (1.1.0)
fastlane-plugin-brew (~> 0.1.1)
gh_inspector (1.1.3)
@ -253,6 +254,7 @@ PLATFORMS
DEPENDENCIES
fastlane
fastlane-plugin-diawi
fastlane-plugin-sentry
fastlane-plugin-xcodegen
slather

View File

@ -55,6 +55,8 @@ lane :build_and_publish_on_github do
release_to_github()
upload_dsyms_to_sentry()
end
lane :ios_adhoc do
@ -144,7 +146,7 @@ end
desc "Create GitHub Release"
private_lane :release_to_github do
api_token = "" #ENV["GITHUB_TOKEN"]
api_token = ENV["GITHUB_TOKEN"]
UI.user_error!("Invalid GitHub API token.") unless !api_token.to_s.empty?
# Get the Diawi link from Diawi action shared value
@ -185,3 +187,16 @@ private_lane :update_app_icon do |options|
end
end
end
private_lane :upload_dsyms_to_sentry do
auth_token = ENV["SENTRY_AUTH_TOKEN"]
UI.user_error!("Invalid Sentry Auth token.") unless !auth_token.to_s.empty?
sentry_upload_dif(
auth_token: auth_token,
org_slug: 'element',
project_slug: 'elementx',
url: 'https://sentry.tools.element.io/',
path: './build/ElementX.app.dSYM.zip',
)
end

View File

@ -4,3 +4,4 @@
gem 'fastlane-plugin-diawi'
gem 'fastlane-plugin-xcodegen'
gem 'fastlane-plugin-sentry'