Manual Uploads

If you're not already using Fastlane uploads you can upload manually using the API.

Getting a Signed URL

Using the /upload endpoint you can create a new upload and retrieve a signed URL to upload your zip file. The full documentation for this API endpoint is available here.

Uploading to the signed URL

With the signed URL, you can make a PUT request to upload your .zip file. The request should include the Content-Type: application/zip header. For example:

curl -v -H 'Content-Type: application/zip' \
  -T MyArchive.xcarchive.zip "SIGNED_URL"

A complete example of a manual upload using shell commands is below:

API_KEY=<YOUR_API_KEY_HERE>

json_body='{
    "filename":"example.zip",
  "branch":"example_branch_name",
  "repoName":"example_repo_name",
  "buildType":"release",
  "prNumber": "123",
  "sha":"123456",
  "baseSha":"654321"}'

upload_response=$(curl --request POST \
                     --url "https://api.emergetools.com/upload" \
                     --header 'Accept: application/json' \
                     --header 'Content-Type: application/json' \
                     --header "X-API-Token: ${API_KEY}" \
                     --data "${json_body}")

# Pull the uploadURL field from the response using jq
upload_url=$(echo "$upload_response" | jq -r .uploadURL)

curl -v -H 'Content-Type: application/zip' -T <PATH_TO_BUILD_ARTIFACT> "$upload_url"