GitHub Action

(5 minute setup time)

The Emerge GitHub action allows you to upload builds from a GitHub workflow.

The action's source code is hosted on Emerge's GitHub.


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.

Create Emerge API key and add to secrets

First, create an Emerge API key. You can create one from your Emerge profile page.


Create an Emerge API key in your Emerge profile page

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

    branches: [ main ]
    branches: [ main ]

    runs-on: ubuntu-latest
      - uses: actions/[email protected]
      - name: Generate Android (or iOS) release bundle
        run: # generate release artifacts, e.g. with Gradle or xcodebuild
      - name: Upload artifact to Emerge
        uses: EmergeTools/[email protected]
          artifact_path: path/to/app-release.aab (or a for iOS)
          emerge_api_key: ${{ secrets.EMERGE_API_KEY }}
          build_type: release # Optional, change if your workflow builds a specific type

After uploading, Emerge will run analysis on the uploaded build. If you haven't, set up GitHub comments by following our GitHub docs.

For more details about the upload process and Emerge's supported artifact types, see
the Uploading Basics.