GitLab CI/CD

GitLab App Distribution on Every Pipeline Run

Add a job to your .gitlab-ci.yml, and any pipeline that reaches it pushes a build to AppShare, no separate step for anyone to remember.

What You Get

Three Reasons Teams Automate This Job

  • One File, Every Merge

    Add a single job to the .gitlab-ci.yml you already have, and it applies to every pipeline run from then on.

  • Runs on the Runner You Already Use

    Whether you’re on GitLab.com’s shared runners or a self-managed instance, the release job runs on the same runner as the rest of your pipeline, including macOS runners for GitLab iOS deployment.

  • Control Exactly When It Fires

    GitLab's rules keyword lets you decide precisely which branch, tag, or event triggers the release, not just "every push."

SETUP

Set Up GitLab CI App Deployment in Four Steps

Follow these four steps to automate your mobile distribution on every merge or pipeline run.

1
Step 1

Find the file at your repo root or create one if this is your first pipeline.

2

Add a masked CI/CD variable

Secret

In Settings → CI/CD → Variables, add APPSHARE_API_KEY as a masked variable.

3

Add the upload job

Pipeline

Add the upload_to_appshare job to execute when your pipeline passes.

4

Commit & Push

Deploy

Push your changes to trigger your first automated build and distribution.

Step 1 of 4
Step 1

Open your .gitlab-ci.yml

Open your repository's .gitlab-ci.yml at the project root. Ensure your pipeline defines the build and release stages.

.gitlab-ci.yml

stages:
  - build
  - release

# Your existing build job produces the APK/IPA artifact
build_app:
  stage: build
  script:
    - ./gradlew assembleRelease
  artifacts:
    paths:
      - app/build/outputs/apk/release/*.apk
Ensure your build step exports artifacts so the release job can access them.

LIFECYCLE

What Actually Happens on a Push

  • 01

    Pipeline Starts

    A push, merge request, or scheduled run kicks off the pipeline defined in your .gitlab-ci.yml

  • 02

    Runner Builds the App

    A GitLab Runner picks up the job once earlier stages pass, and runs the real build command, producing the actual file.

  • 03

    AppShare CLI Installs

    The job's script installs AppShare CLI fresh, right after that build command.

  • 04

    Build Gets Pushed

    The CLI reads the masked variable and uploads the file the build step just produced.

UNDER THE HOOD

GitLab Just Runs the CLI

That script step is just AppShare CLI, running inside your pipeline instead of your terminal.

Other Platforms

AppShare Works With Your Pipeline Too

FAQ

Questions About the GitLab CI/CD Integration

What is GitLab app distribution?

GitLab app distribution means using your GitLab CI/CD pipeline to send every new Android or iOS build to testers automatically. With AppShare, a job in your .gitlab-ci.yml installs the AppShare CLI and uploads the .apk or .ipa after the build stage passes. Testers get an install link and QR code without anyone uploading the build by hand.

How does GitLab iOS deployment work for IPA builds?

The AppShare job is the same; only the build differs. GitLab IPA deployment needs a macOS runner, GitLab-hosted or self-managed, to build and sign the .ipa, which is then passed to the upload job as an artifact. Ad hoc builds only install on devices whose UDIDs are in the provisioning profile, so register tester devices in AppShare first.

Do I need a specific GitLab Runner for this?

No. The upload job runs as a standard script job, so it works on GitLab.com shared runners or your own self-managed runners, as long as the runner can run shell commands and Node-based tools. Only the build job has platform needs: Android builds run on Linux runners, while iOS builds need a macOS runner.

How do I set up GitLab CI app deployment?

Open your .gitlab-ci.yml and add an upload_to_appshare job in a stage after your build, with the build job exporting the .apk or .ipa as an artifact. Store your API key in Settings, CI/CD, Variables as a masked variable named APPSHARE_API_KEY, then reference it in the script instead of writing the key into the file.

What triggers the release job?

Whatever you define under rules in the job. A push to a specific branch is the most common, but merge request pipelines, tags, and scheduled runs work too. To release from merge requests instead of branch pushes, match on merge request events rather than $CI_COMMIT_BRANCH, and every other pipeline skips the upload job.

Can I add release notes automatically?

Not from the pipeline yet. The AppShare CLI uploads the build (appshare <file> --app-id <slug>) and has no release notes flag. Once the upload finishes, add or edit the notes on the release's Release Notes tab in AppShare, and testers see them on the install page.

Get Started

Add It to Your Next Pipeline

Add the job, mask the variable, and every pipeline after this one handles the release on its own.

  • Works on shared or self-managed runners

  • Controlled by rules, not guesswork

  • Masked variables, not plaintext keys

About Zunoy

Ask a question about Zunoy's products, pricing, or docs.

⌘K