Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 0 additions & 59 deletions .github/workflows/ios_emerge_upload_adhoc.yml

This file was deleted.

101 changes: 0 additions & 101 deletions .github/workflows/ios_emerge_upload_main.yml

This file was deleted.

57 changes: 56 additions & 1 deletion .github/workflows/ios_emerge_upload_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ jobs:
- name: Select Xcode version
run: sudo xcode-select -s '/Applications/Xcode_26.0.1.app/Contents/Developer'

- name: Install iOS platform
run: xcodebuild -downloadPlatform iOS
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


- name: Set up Ruby env
uses: ruby/setup-ruby@v1
with:
Expand All @@ -37,7 +40,7 @@ jobs:
run: |
echo $CERTIFICATE_BASE64 | base64 --decode > signing-cert.p12

- name: Build & upload iOS size analysis binary to Emerge Tools
- name: Build iOS binary
run: bundle exec fastlane ios build_upload_emerge
env:
ASC_KEY_ID: ${{ secrets.ASC_KEY_ID }}
Expand All @@ -50,3 +53,55 @@ jobs:
SENTRY_SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_SENTRY_AUTH_TOKEN }}
CONFIGURATION: Release
EMERGE_BUILD_TYPE: pull-request

- name: Print build log on failure
if: failure()
run: |
echo "=== Full Gym Build Log ==="
cat ~/Library/Logs/gym/HackerNews-HackerNews.log || echo "Log file not found"

- name: Upload to Emerge Tools via REST API
env:
EMERGE_API_TOKEN: ${{ secrets.EMERGE_API_KEY }}
run: |
set -e

ZIP_PATH="./build/HackerNews.xcarchive.zip"

echo "Zipping xcarchive..."
cd build && zip -r -q HackerNews.xcarchive.zip HackerNews.xcarchive && cd ..

echo "Getting upload URL from Emerge..."
UPLOAD_RESPONSE=$(curl -s -X POST "https://api.emergetools.com/upload" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "X-API-Token: $EMERGE_API_TOKEN" \
-d '{
"filename": "HackerNews.xcarchive.zip",
"branch": "${{ github.head_ref }}",
"repoName": "${{ github.repository }}",
"sha": "${{ github.event.pull_request.head.sha }}",
"baseSha": "${{ github.event.pull_request.base.sha }}",
"prNumber": "${{ github.event.pull_request.number }}"
}')

echo "Upload response: $UPLOAD_RESPONSE"

UPLOAD_URL=$(echo "$UPLOAD_RESPONSE" | jq -r '.uploadURL')

if [ -z "$UPLOAD_URL" ] || [ "$UPLOAD_URL" = "null" ]; then
echo "Failed to get upload URL. Response: $UPLOAD_RESPONSE"
exit 1
fi

echo "Uploading to Emerge..."
UPLOAD_STATUS=$(curl -s -o /dev/null -w "%{http_code}" -X PUT "$UPLOAD_URL" \
-H "Content-Type: application/zip" \
-T "$ZIP_PATH")

if [ "$UPLOAD_STATUS" -ne 200 ]; then
echo "Upload failed with status: $UPLOAD_STATUS"
exit 1
fi

echo "Successfully uploaded to Emerge Tools!"
93 changes: 0 additions & 93 deletions .github/workflows/ios_emerge_upload_snapshots.yml

This file was deleted.

5 changes: 1 addition & 4 deletions ios/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,7 @@ platform :ios do
load_asc_api_key
prepare_signing
build_app_for_scheme
emerge(
tag: ENV['EMERGE_BUILD_TYPE'],
app_id_suffix: ENV['APP_ID_SUFFIX']
)
# Emerge upload moved to GitHub Action step using REST API
export_thinned_build
sentry_upload_build(
auth_token: ENV['SENTRY_SENTRY_AUTH_TOKEN'],
Expand Down