Skip to content

Commit d8d0a68

Browse files
committed
test
1 parent 9a5a5c4 commit d8d0a68

File tree

1 file changed

+1
-84
lines changed

1 file changed

+1
-84
lines changed

.github/workflows/ios_sentry_upload_pr.yml

Lines changed: 1 addition & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
build:
10-
runs-on: macos-15
10+
runs-on: ubuntu-latest
1111

1212
defaults:
1313
run:
@@ -21,86 +21,3 @@ jobs:
2121

2222
- name: test
2323
run: echo $(git merge-base --fork-point ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }})"
24-
25-
- name: Select Xcode version
26-
run: sudo xcode-select -s '/Applications/Xcode_16.4.app/Contents/Developer'
27-
28-
- name: Set up Ruby env
29-
uses: ruby/setup-ruby@v1
30-
with:
31-
ruby-version: 3.1.4
32-
bundler-cache: true
33-
34-
- name: Install Sentry CLI
35-
run: |
36-
curl -L -o sentry-cli https://github.com/getsentry/sentry-cli/releases/download/2.53.0-alpha/sentry-cli-Darwin-universal
37-
chmod +x sentry-cli
38-
sudo mv sentry-cli /usr/local/bin/
39-
40-
- name: Setup gems
41-
run: exec ../.github/scripts/ios/setup.sh
42-
43-
- name: Decode signing certificate into a file
44-
env:
45-
CERTIFICATE_BASE64: ${{ secrets.IOS_DIST_SIGNING_KEY_BASE64 }}
46-
run: |
47-
echo $CERTIFICATE_BASE64 | base64 --decode > signing-cert.p12
48-
49-
- name: Build XCArchive
50-
run: bundle exec fastlane ios build_only
51-
env:
52-
ASC_KEY_ID: ${{ secrets.ASC_KEY_ID }}
53-
ASC_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }}
54-
ASC_KEY: ${{ secrets.ASC_PRIVATE_KEY }}
55-
SIGNING_KEY_PASSWORD: ${{ secrets.IOS_DIST_SIGNING_KEY_PASSWORD }}
56-
SIGNING_KEY_FILE_PATH: signing-cert.p12
57-
EMERGE_API_TOKEN: ${{ secrets.EMERGE_API_KEY }}
58-
CONFIGURATION: Release
59-
EMERGE_BUILD_TYPE: pull-request
60-
61-
- name: Strip asset catalogs from XCArchive
62-
run: |
63-
echo "Finding and thinning asset catalogs in XCArchive..."
64-
XCARCHIVE_PATH='./build/HackerNews.xcarchive'
65-
66-
# Check if XCArchive exists
67-
if [ ! -d "$XCARCHIVE_PATH" ]; then
68-
echo "Error: XCArchive not found at $XCARCHIVE_PATH"
69-
exit 1
70-
fi
71-
72-
# Look for asset catalogs in the Products directory
73-
find "$XCARCHIVE_PATH" -name "*.car" -type f | while read -r car_file; do
74-
echo "Found asset catalog: $car_file"
75-
# Create backup of original
76-
cp "$car_file" "${car_file}.backup"
77-
# Thin the asset catalog using assetutil
78-
assetutil -i "phone" -s "3" -p "P3" -M "4" -g "MTL6,1" -r "13.0" "$car_file" -o "$car_file"
79-
if [ $? -eq 0 ]; then
80-
echo "Successfully thinned: $car_file"
81-
rm "${car_file}.backup"
82-
else
83-
echo "Failed to thin: $car_file, restoring backup"
84-
mv "${car_file}.backup" "$car_file"
85-
fi
86-
done
87-
88-
- name: Upload iOS size analysis binary to Sentry
89-
run: |
90-
sentry-cli \
91-
--log-level=debug \
92-
--auth-token ${{ secrets.SENTRY_SENTRY_AUTH_TOKEN }} \
93-
build \
94-
upload \
95-
./build/HackerNews.xcarchive \
96-
--org sentry \
97-
--project launchpad-test-ios \
98-
--head-sha ${{ github.event.pull_request.head.sha }} \
99-
--base-sha ${{ github.event.pull_request.base.sha }} \
100-
--vcs-provider github \
101-
--head-repo-name ${{ github.repository }} \
102-
--base-repo-name ${{ github.repository }} \
103-
--head-ref ${{ github.head_ref }} \
104-
--base-ref ${{ github.base_ref }} \
105-
--pr-number ${{ github.event.number }} \
106-
--build-configuration Release

0 commit comments

Comments
 (0)