Important
This action is no longer maintained for Android usage (please use the Emerge Gradle plugin instead). As for iOS, if you don't have an existing CI setup or already use fastlane, we strongly recommend you use the Emerge Fastlane plugin. If using the Fastlane/Gradle plugins, the GitHub action is unnecessary, as all upload functionality is built into the respective integrations.
Action to upload your build directly to Emerge for analysis.
The Emerge upload action should be run on any event that should trigger a size analysis. Examples of this are:
- When pushing to specific branches (main/release).
- On any PR to the main branch.
See action.yml for all inputs and descriptions.
First, create an Emerge API key. You can create one from your Emerge profile page.
Add the API key to your secrets in your repository. Do not leave this key in plain text in your workflow!
Learn more about creating and using encrypted secrets
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 archive build
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
After uploading, Emerge will run analysis on the uploaded build. If you haven't, set up Github comments by following our Github documentation.
For more details about the upload process and Emerge's supported artifact types, see the Emerge Uploading docs.