# GitLab app distribution for Android builds

## Quick Start&#x20;

* Login into our app distribution tool [getupdraft.com/login ](https://getupdraft.com/login)
* Go to your Profile within the sidebar
* Copy your **API Key** as well as the **App Key** of your App&#x20;
  * Your API Key you find in your Profile.&#x20;
  * The App Key you will find on the application overview. The App key differs for each environment.

### **Configure Gitlab CI/CD Settings & Variables**

As soon you have your Updraft account created, you are ready to configure the CI/ CD pipeline with GitLab.

1. Open your Gitlab Project
2. Go to the Settings
3. Select CI/CD
4. Go to the section Variables
5. Add your Variables from Updraft (API key and App Key) in two separate fiels

### **Add .gitlab-ci.yml file for Android app distribution**

1. Head over to the root directory (files) of your Android app project in GitLab.&#x20;
2. Add a new file your .gitlab-cy.yml file
3. Copy the below example of .gitlab-ci.yml file

## Example of .gitlab-ci.yml file for Android app distribution

```
stages:
  - build
  - updraft

buildProd:
  stage: build
  only:
    - release
  script:
    - ./gradlew app:assembleProdRelease
  artifacts:
    paths:
      - app/build/outputs/apk/prod/release/*.apk

deploy:
  stage: updraft
  only:
  - release
  script:
  - |
    curl \
      -F whats_new="Gitlab build" \
      -F "app=@app/build/outputs/apk/prod/release/android.apk" \
      -X PUT https://getupdraft.com/api/app_upload/$UPDRAFT_APP_KEY/$UPDRAFT_API_KEY/

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.getupdraft.com/integrations/gitlab-ci/gitlab-app-distribution-for-android-builds.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
