1+ name : Sentry PR iOS Upload (Size Analysis)
2+
3+ on :
4+ pull_request :
5+ branches : [main]
6+ paths : [ios/**, .github/workflows/ios_sentry_upload_pr.yml]
7+
8+ jobs :
9+ build :
10+ runs-on : macos-15
11+
12+ defaults :
13+ run :
14+ working-directory : ./ios
15+
16+ steps :
17+ - name : Checkout
18+ uses : actions/checkout@v5
19+ with :
20+ fetch-depth : 0
21+
22+ - name : Select Xcode version
23+ run : sudo xcode-select -s '/Applications/Xcode_16.4.app/Contents/Developer'
24+
25+ - name : Set up Ruby env
26+ uses : ruby/setup-ruby@v1
27+ with :
28+ ruby-version : 3.1.4
29+ bundler-cache : true
30+
31+ - name : Install Sentry CLI
32+ run : |
33+ curl -L -o sentry-cli https://github.com/getsentry/sentry-cli/releases/download/2.53.0-alpha/sentry-cli-Darwin-universal
34+ chmod +x sentry-cli
35+ sudo mv sentry-cli /usr/local/bin/
36+
37+ - name : Setup gems
38+ run : exec ../.github/scripts/ios/setup.sh
39+
40+ - name : Decode signing certificate into a file
41+ env :
42+ CERTIFICATE_BASE64 : ${{ secrets.IOS_DIST_SIGNING_KEY_BASE64 }}
43+ run : |
44+ echo $CERTIFICATE_BASE64 | base64 --decode > signing-cert.p12
45+
46+ - name : Build XCArchive
47+ run : bundle exec fastlane ios build_only
48+ env :
49+ ASC_KEY_ID : ${{ secrets.ASC_KEY_ID }}
50+ ASC_ISSUER_ID : ${{ secrets.ASC_ISSUER_ID }}
51+ ASC_KEY : ${{ secrets.ASC_PRIVATE_KEY }}
52+ SIGNING_KEY_PASSWORD : ${{ secrets.IOS_DIST_SIGNING_KEY_PASSWORD }}
53+ SIGNING_KEY_FILE_PATH : signing-cert.p12
54+ EMERGE_API_TOKEN : ${{ secrets.EMERGE_API_KEY }}
55+ CONFIGURATION : Release
56+ EMERGE_BUILD_TYPE : pull-request
57+
58+ - name : Upload iOS size analysis binary to Sentry
59+ run : |
60+ sentry-cli \
61+ --log-level=debug \
62+ --auth-token ${{ secrets.SENTRY_SENTRY_AUTH_TOKEN }} \
63+ build \
64+ upload \
65+ ./build/HackerNews.xcarchive \
66+ --org sentry \
67+ --project launchpad-test-ios \
68+ --head-sha ${{ github.event.pull_request.head.sha }} \
69+ --base-sha ${{ github.event.pull_request.base.sha }} \
70+ --vcs-provider github \
71+ --head-repo-name ${{ github.repository }} \
72+ --base-repo-name ${{ github.repository }} \
73+ --head-ref ${{ github.head_ref }} \
74+ --base-ref ${{ github.base_ref }} \
75+ --pr-number ${{ github.event.number }} \
76+ --build-configuration Release
0 commit comments