diff --git a/Gemfile.lock b/Gemfile.lock index c6b4a4545..f08e7c081 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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 diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 0b07a9206..ea2b4a59b 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -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 diff --git a/fastlane/Pluginfile b/fastlane/Pluginfile index 3705889ed..97b325ebf 100644 --- a/fastlane/Pluginfile +++ b/fastlane/Pluginfile @@ -4,3 +4,4 @@ gem 'fastlane-plugin-diawi' gem 'fastlane-plugin-xcodegen' +gem 'fastlane-plugin-sentry'