GitHub Action (iOS)
(5 minute setup time)
The Emerge GitHub Action allows you to upload app builds from a GitHub workflow. If you are looking to analyze your SPM framework see Analyzing a SPM Framework (iOS).
The open source project can be viewed at https://github.com/EmergeTools/emerge-upload-action.
Not recommended for Android
Emerge recommends using the Emerge Gradle plugin as the primary integration point on Android. If using the Gradle Plugin, the GitHub action is not needed, as all upload functionality is built into the plugin.
Disclaimer: If you don't currently have a CI pipeline setup, we'd strongly recommend using Fastlane.
Usage
The Emerge upload action should be run on any event that should trigger a size analysis. Examples of this are:
- When pushing or merging to specific branches (
main
/release
). - On any PR to the main branch.
See action.yml for all inputs and descriptions.
Obtain an API key
Follow our steps on obtaining an API key.
Add the API key to your secrets in your repository or organization. Do not leave this key in plain text in your workflow!
Learn more about creating and using encrypted secrets.
Incorporate in your workflow
Build your artifact in a step before the Emerge upload action. Pass the generated artifact's path as the artifact_path
argument, and your Emerge API key secret as the EMERGE_API_KEY
argument:
name: Your workflow
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Generate iOS release bundle
run: # generate release build, e.g. with xcodebuild
- name: Upload artifact to Emerge
uses: EmergeTools/[email protected]
with:
artifact_path: path/to/app-release.xcarchive.zip
emerge_api_key: ${{ secrets.EMERGE_API_KEY }}
build_type: release # Optional, change if your workflow builds a specific type
To enable Pull Request comments, continue to our GitHub docs.
For more details about the upload process and Emerge's supported artifact types, see
the Uploading Basics.
Updated about 2 months ago