Skip to content

Commit cda28ea

Browse files
authored
chore: Add sentry_upload_build to build job (#26)
- Added support for the `sentry-fastlane-plugin` from the GitHub repository. - Updated various gems in the Gemfile.lock to their latest versions. - Modified the build-test workflow to include Ruby setup and use Fastlane for CI builds. - Adjusted code signing settings in the Xcode project to Manual and cleared the development team ID for better configuration management. - Included xcarchive files in .gitignore to prevent unnecessary tracking.
1 parent a768e29 commit cda28ea

File tree

6 files changed

+83
-38
lines changed

6 files changed

+83
-38
lines changed

.github/workflows/build-test.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- main
1010

1111
concurrency:
12-
group: ${{ github.workflow }}-${{ github.ref }}
12+
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.job.name}}
1313
cancel-in-progress: true
1414

1515
jobs:
@@ -23,8 +23,16 @@ jobs:
2323
- name: Install Dependencies
2424
run: brew bundle --file Brewfile-ci
2525

26-
- name: Build
27-
run: make build-ios
26+
- name: Setup Ruby
27+
uses: ruby/setup-ruby@v1
28+
with:
29+
bundler-cache: true
30+
31+
- run: bundle exec fastlane build_ci
32+
env:
33+
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
34+
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
35+
MATCH_GIT_PRIVATE_KEY: ${{ secrets.MATCH_GIT_PRIVATE_KEY }}
2836

2937
- name: Upload Logs
3038
uses: actions/upload-artifact@v4

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ xcuserdata/
4040
*.ipa
4141
*.dSYM.zip
4242
*.dSYM
43+
*.xcarchive
4344

4445
## Playgrounds
4546
timeline.xctimeline

Flinky.xcodeproj/project.pbxproj

Lines changed: 32 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,14 +1047,15 @@
10471047
isa = XCBuildConfiguration;
10481048
buildSettings = {
10491049
BUNDLE_LOADER = "$(TEST_HOST)";
1050-
CODE_SIGN_STYLE = Automatic;
1050+
CODE_SIGN_STYLE = Manual;
10511051
CURRENT_PROJECT_VERSION = 18;
1052-
DEVELOPMENT_TEAM = BZ362SQ6AB;
1052+
DEVELOPMENT_TEAM = "";
10531053
GENERATE_INFOPLIST_FILE = YES;
10541054
IPHONEOS_DEPLOYMENT_TARGET = 18.0;
10551055
MARKETING_VERSION = 1.1.0;
10561056
PRODUCT_BUNDLE_IDENTIFIER = com.techprimate.Flinky.Tests;
10571057
PRODUCT_NAME = "$(TARGET_NAME)";
1058+
PROVISIONING_PROFILE_SPECIFIER = "";
10581059
SWIFT_EMIT_LOC_STRINGS = NO;
10591060
SWIFT_VERSION = 5.0;
10601061
TARGETED_DEVICE_FAMILY = "1,2";
@@ -1066,14 +1067,15 @@
10661067
isa = XCBuildConfiguration;
10671068
buildSettings = {
10681069
BUNDLE_LOADER = "$(TEST_HOST)";
1069-
CODE_SIGN_STYLE = Automatic;
1070+
CODE_SIGN_STYLE = Manual;
10701071
CURRENT_PROJECT_VERSION = 18;
1071-
DEVELOPMENT_TEAM = BZ362SQ6AB;
1072+
DEVELOPMENT_TEAM = "";
10721073
GENERATE_INFOPLIST_FILE = YES;
10731074
IPHONEOS_DEPLOYMENT_TARGET = 18.0;
10741075
MARKETING_VERSION = 1.1.0;
10751076
PRODUCT_BUNDLE_IDENTIFIER = com.techprimate.Flinky.Tests;
10761077
PRODUCT_NAME = "$(TARGET_NAME)";
1078+
PROVISIONING_PROFILE_SPECIFIER = "";
10771079
SWIFT_EMIT_LOC_STRINGS = NO;
10781080
SWIFT_VERSION = 5.0;
10791081
TARGETED_DEVICE_FAMILY = "1,2";
@@ -1086,9 +1088,9 @@
10861088
buildSettings = {
10871089
BUILD_LIBRARY_FOR_DISTRIBUTION = NO;
10881090
CODE_SIGN_IDENTITY = "Apple Development";
1089-
CODE_SIGN_STYLE = Automatic;
1091+
CODE_SIGN_STYLE = Manual;
10901092
CURRENT_PROJECT_VERSION = 18;
1091-
DEVELOPMENT_TEAM = BZ362SQ6AB;
1093+
DEVELOPMENT_TEAM = "";
10921094
DYLIB_COMPATIBILITY_VERSION = 1;
10931095
DYLIB_CURRENT_VERSION = 18;
10941096
DYLIB_INSTALL_NAME_BASE = "@rpath";
@@ -1107,6 +1109,7 @@
11071109
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20";
11081110
PRODUCT_BUNDLE_IDENTIFIER = com.techprimate.Flinky.Core;
11091111
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
1112+
PROVISIONING_PROFILE_SPECIFIER = "";
11101113
SKIP_INSTALL = YES;
11111114
SWIFT_EMIT_LOC_STRINGS = YES;
11121115
SWIFT_INSTALL_MODULE = YES;
@@ -1123,9 +1126,10 @@
11231126
buildSettings = {
11241127
BUILD_LIBRARY_FOR_DISTRIBUTION = NO;
11251128
CODE_SIGN_IDENTITY = "Apple Development";
1126-
CODE_SIGN_STYLE = Automatic;
1129+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Distribution";
1130+
CODE_SIGN_STYLE = Manual;
11271131
CURRENT_PROJECT_VERSION = 18;
1128-
DEVELOPMENT_TEAM = BZ362SQ6AB;
1132+
DEVELOPMENT_TEAM = "";
11291133
DYLIB_COMPATIBILITY_VERSION = 1;
11301134
DYLIB_CURRENT_VERSION = 18;
11311135
DYLIB_INSTALL_NAME_BASE = "@rpath";
@@ -1144,6 +1148,7 @@
11441148
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20";
11451149
PRODUCT_BUNDLE_IDENTIFIER = com.techprimate.Flinky.Core;
11461150
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
1151+
PROVISIONING_PROFILE_SPECIFIER = "";
11471152
SKIP_INSTALL = YES;
11481153
SWIFT_EMIT_LOC_STRINGS = YES;
11491154
SWIFT_INSTALL_MODULE = YES;
@@ -1326,7 +1331,7 @@
13261331
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
13271332
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
13281333
CODE_SIGN_ENTITLEMENTS = Targets/App/Sources/Resources/App.entitlements;
1329-
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Distribution";
1334+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
13301335
CODE_SIGN_STYLE = Manual;
13311336
CURRENT_PROJECT_VERSION = 18;
13321337
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
@@ -1430,14 +1435,15 @@
14301435
D4D50A0D2E46286D0067A402 /* Debug */ = {
14311436
isa = XCBuildConfiguration;
14321437
buildSettings = {
1433-
CODE_SIGN_STYLE = Automatic;
1438+
CODE_SIGN_STYLE = Manual;
14341439
CURRENT_PROJECT_VERSION = 18;
1435-
DEVELOPMENT_TEAM = BZ362SQ6AB;
1440+
DEVELOPMENT_TEAM = "";
14361441
GENERATE_INFOPLIST_FILE = YES;
14371442
IPHONEOS_DEPLOYMENT_TARGET = 18.0;
14381443
MARKETING_VERSION = 1.1.0;
14391444
PRODUCT_BUNDLE_IDENTIFIER = com.techprimate.Flinky.ShareExtensionUITests;
14401445
PRODUCT_NAME = "$(TARGET_NAME)";
1446+
PROVISIONING_PROFILE_SPECIFIER = "";
14411447
SWIFT_EMIT_LOC_STRINGS = NO;
14421448
SWIFT_VERSION = 5.0;
14431449
TARGETED_DEVICE_FAMILY = "1,2";
@@ -1448,14 +1454,15 @@
14481454
D4D50A0E2E46286D0067A402 /* Release */ = {
14491455
isa = XCBuildConfiguration;
14501456
buildSettings = {
1451-
CODE_SIGN_STYLE = Automatic;
1457+
CODE_SIGN_STYLE = Manual;
14521458
CURRENT_PROJECT_VERSION = 18;
1453-
DEVELOPMENT_TEAM = BZ362SQ6AB;
1459+
DEVELOPMENT_TEAM = "";
14541460
GENERATE_INFOPLIST_FILE = YES;
14551461
IPHONEOS_DEPLOYMENT_TARGET = 18.0;
14561462
MARKETING_VERSION = 1.1.0;
14571463
PRODUCT_BUNDLE_IDENTIFIER = com.techprimate.Flinky.ShareExtensionUITests;
14581464
PRODUCT_NAME = "$(TARGET_NAME)";
1465+
PROVISIONING_PROFILE_SPECIFIER = "";
14591466
SWIFT_EMIT_LOC_STRINGS = NO;
14601467
SWIFT_VERSION = 5.0;
14611468
TARGETED_DEVICE_FAMILY = "1,2";
@@ -1466,14 +1473,15 @@
14661473
D4E789192E461A83005DA720 /* Debug */ = {
14671474
isa = XCBuildConfiguration;
14681475
buildSettings = {
1469-
CODE_SIGN_STYLE = Automatic;
1476+
CODE_SIGN_STYLE = Manual;
14701477
CURRENT_PROJECT_VERSION = 18;
1471-
DEVELOPMENT_TEAM = BZ362SQ6AB;
1478+
DEVELOPMENT_TEAM = "";
14721479
GENERATE_INFOPLIST_FILE = YES;
14731480
IPHONEOS_DEPLOYMENT_TARGET = 18.0;
14741481
MARKETING_VERSION = 1.1.0;
14751482
PRODUCT_BUNDLE_IDENTIFIER = com.techprimate.Flinky.FlinkyCoreTests;
14761483
PRODUCT_NAME = "$(TARGET_NAME)";
1484+
PROVISIONING_PROFILE_SPECIFIER = "";
14771485
SWIFT_EMIT_LOC_STRINGS = NO;
14781486
SWIFT_VERSION = 5.0;
14791487
TARGETED_DEVICE_FAMILY = "1,2";
@@ -1484,14 +1492,15 @@
14841492
D4E7891A2E461A83005DA720 /* Release */ = {
14851493
isa = XCBuildConfiguration;
14861494
buildSettings = {
1487-
CODE_SIGN_STYLE = Automatic;
1495+
CODE_SIGN_STYLE = Manual;
14881496
CURRENT_PROJECT_VERSION = 18;
1489-
DEVELOPMENT_TEAM = BZ362SQ6AB;
1497+
DEVELOPMENT_TEAM = "";
14901498
GENERATE_INFOPLIST_FILE = YES;
14911499
IPHONEOS_DEPLOYMENT_TARGET = 18.0;
14921500
MARKETING_VERSION = 1.1.0;
14931501
PRODUCT_BUNDLE_IDENTIFIER = com.techprimate.Flinky.FlinkyCoreTests;
14941502
PRODUCT_NAME = "$(TARGET_NAME)";
1503+
PROVISIONING_PROFILE_SPECIFIER = "";
14951504
SWIFT_EMIT_LOC_STRINGS = NO;
14961505
SWIFT_VERSION = 5.0;
14971506
TARGETED_DEVICE_FAMILY = "1,2";
@@ -1502,14 +1511,15 @@
15021511
D4ECAABC2E3CF6FB00C757EA /* Debug */ = {
15031512
isa = XCBuildConfiguration;
15041513
buildSettings = {
1505-
CODE_SIGN_STYLE = Automatic;
1514+
CODE_SIGN_STYLE = Manual;
15061515
CURRENT_PROJECT_VERSION = 18;
1507-
DEVELOPMENT_TEAM = BZ362SQ6AB;
1516+
DEVELOPMENT_TEAM = "";
15081517
GENERATE_INFOPLIST_FILE = YES;
15091518
IPHONEOS_DEPLOYMENT_TARGET = 18.0;
15101519
MARKETING_VERSION = 1.1.0;
15111520
PRODUCT_BUNDLE_IDENTIFIER = com.techprimate.Flinky.ScreenshotUITests;
15121521
PRODUCT_NAME = "$(TARGET_NAME)";
1522+
PROVISIONING_PROFILE_SPECIFIER = "";
15131523
SWIFT_EMIT_LOC_STRINGS = NO;
15141524
SWIFT_VERSION = 5.0;
15151525
TARGETED_DEVICE_FAMILY = "1,2";
@@ -1520,14 +1530,15 @@
15201530
D4ECAABD2E3CF6FB00C757EA /* Release */ = {
15211531
isa = XCBuildConfiguration;
15221532
buildSettings = {
1523-
CODE_SIGN_STYLE = Automatic;
1533+
CODE_SIGN_STYLE = Manual;
15241534
CURRENT_PROJECT_VERSION = 18;
1525-
DEVELOPMENT_TEAM = BZ362SQ6AB;
1535+
DEVELOPMENT_TEAM = "";
15261536
GENERATE_INFOPLIST_FILE = YES;
15271537
IPHONEOS_DEPLOYMENT_TARGET = 18.0;
15281538
MARKETING_VERSION = 1.1.0;
15291539
PRODUCT_BUNDLE_IDENTIFIER = com.techprimate.Flinky.ScreenshotUITests;
15301540
PRODUCT_NAME = "$(TARGET_NAME)";
1541+
PROVISIONING_PROFILE_SPECIFIER = "";
15311542
SWIFT_EMIT_LOC_STRINGS = NO;
15321543
SWIFT_VERSION = 5.0;
15331544
TARGETED_DEVICE_FAMILY = "1,2";

Gemfile.lock

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
GIT
2+
remote: https://github.com/getsentry/sentry-fastlane-plugin.git
3+
revision: 815cc447666b9c54cb32b3ffa864f453d68aaebb
4+
branch: master
5+
specs:
6+
fastlane-plugin-sentry (1.33.0)
7+
os (~> 1.1, >= 1.1.4)
8+
19
GEM
210
remote: https://rubygems.org/
311
specs:
@@ -11,28 +19,28 @@ GEM
1119
artifactory (3.0.17)
1220
atomos (0.1.3)
1321
aws-eventstream (1.4.0)
14-
aws-partitions (1.1139.0)
15-
aws-sdk-core (3.228.0)
22+
aws-partitions (1.1159.0)
23+
aws-sdk-core (3.232.0)
1624
aws-eventstream (~> 1, >= 1.3.0)
1725
aws-partitions (~> 1, >= 1.992.0)
1826
aws-sigv4 (~> 1.9)
1927
base64
2028
bigdecimal
2129
jmespath (~> 1, >= 1.6.1)
2230
logger
23-
aws-sdk-kms (1.109.0)
24-
aws-sdk-core (~> 3, >= 3.228.0)
31+
aws-sdk-kms (1.112.0)
32+
aws-sdk-core (~> 3, >= 3.231.0)
2533
aws-sigv4 (~> 1.5)
26-
aws-sdk-s3 (1.195.0)
27-
aws-sdk-core (~> 3, >= 3.228.0)
34+
aws-sdk-s3 (1.199.0)
35+
aws-sdk-core (~> 3, >= 3.231.0)
2836
aws-sdk-kms (~> 1)
2937
aws-sigv4 (~> 1.5)
3038
aws-sigv4 (1.12.1)
3139
aws-eventstream (~> 1, >= 1.0.2)
3240
babosa (1.0.4)
3341
base64 (0.3.0)
3442
benchmark (0.4.1)
35-
bigdecimal (3.2.2)
43+
bigdecimal (3.2.3)
3644
claide (1.1.0)
3745
colored (1.2)
3846
colored2 (3.1.2)
@@ -119,8 +127,6 @@ GEM
119127
fastlane-plugin-appicon (0.16.0)
120128
json
121129
mini_magick (>= 4.9.4, < 5.0.0)
122-
fastlane-plugin-sentry (1.32.0)
123-
os (~> 1.1, >= 1.1.4)
124130
fastlane-sirp (1.0.0)
125131
sysrandom (~> 1.0)
126132
gh_inspector (1.1.3)
@@ -189,15 +195,15 @@ GEM
189195
trailblazer-option (>= 0.1.1, < 0.2.0)
190196
uber (< 0.2.0)
191197
retriable (3.1.2)
192-
rexml (3.4.1)
198+
rexml (3.4.4)
193199
rouge (3.28.0)
194200
ruby2_keywords (0.0.5)
195201
rubyzip (2.4.1)
196202
security (0.1.5)
197-
signet (0.20.0)
203+
signet (0.21.0)
198204
addressable (~> 2.8)
199205
faraday (>= 0.17.5, < 3.a)
200-
jwt (>= 1.5, < 3.0)
206+
jwt (>= 1.5, < 4.0)
201207
multi_json (~> 1.10)
202208
simctl (1.6.10)
203209
CFPropertyList
@@ -235,7 +241,7 @@ DEPENDENCIES
235241
benchmark
236242
fastlane
237243
fastlane-plugin-appicon
238-
fastlane-plugin-sentry
244+
fastlane-plugin-sentry!
239245
ostruct
240246

241247
BUNDLED WITH

fastlane/Fastfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ default_platform(:ios)
22

33
platform :ios do
44
lane :build_ci do
5+
# Configure CI keychain and set match to readonly to avoid prompts
6+
setup_ci if is_ci
7+
58
# Setup code signing
69
sync_code_signing(
710
type: "appstore",
@@ -34,6 +37,14 @@ platform :ios do
3437
"teamID" => "BZ362SQ6AB",
3538
}
3639
)
40+
41+
# Upload the archive to Sentry for further analysis
42+
sentry_upload_build(
43+
auth_token: ENV["SENTRY_AUTH_TOKEN"],
44+
org_slug: "techprimate",
45+
project_slug: "flinky",
46+
xcarchive_path: "./Flinky.xcarchive",
47+
) if is_ci
3748
end
3849

3950
desc "Generate app icon sizes from source image using fastlane-plugin-appicon"
@@ -202,6 +213,14 @@ platform :ios do
202213
wait: true
203214
)
204215

216+
# Upload the xcarchive to Sentry for further analysis
217+
sentry_upload_build(
218+
auth_token: ENV["SENTRY_AUTH_TOKEN"],
219+
org_slug: "techprimate",
220+
project_slug: "flinky",
221+
xcarchive_path: "./Flinky.xcarchive",
222+
)
223+
205224
# Associate commits with the release
206225
sentry_set_commits(
207226
auth_token: ENV["SENTRY_AUTH_TOKEN"],

fastlane/Pluginfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
#
33
# Ensure this file is checked in to source control!
44

5-
gem 'fastlane-plugin-sentry'
5+
gem 'fastlane-plugin-sentry', git: 'https://github.com/getsentry/sentry-fastlane-plugin.git', branch: 'master'
66
gem 'fastlane-plugin-appicon'

0 commit comments

Comments
 (0)