---
title: Native Builds with GitLab CI/CD
description: Trigger Capawesome Cloud native iOS and Android builds from GitLab CI/CD using the Capawesome CLI.
---

# GitLab CI/CD

Trigger native builds from GitLab CI/CD. The build runs in Capawesome Cloud, so the pipeline only authenticates and starts the build.

## Prerequisites

Create an [API token](../../accounts/tokens.md) in Capawesome Cloud and store it as a CI/CD variable named `CAPAWESOME_TOKEN` (masked).

## Pipeline

```yaml title=".gitlab-ci.yml"
variables:
  CAPAWESOME_CLI_VERSION: "4.9.3"
  CAPAWESOME_CLOUD_APP_ID: "00000000-0000-0000-0000-000000000000"

native-build:
  image: node:24
  rules:
    - if: $CI_PIPELINE_SOURCE == "web"
  script:
    - npx @capawesome/cli@$CAPAWESOME_CLI_VERSION login --token $CAPAWESOME_TOKEN
    - >
      npx @capawesome/cli@$CAPAWESOME_CLI_VERSION apps:builds:create
      --app-id $CAPAWESOME_CLOUD_APP_ID
      --platform android
      --git-ref $CI_COMMIT_SHA
      --yes
```

Pin the CLI version for reproducible runs. To attach a signing certificate or environment, pass the relevant flags — see the [CLI reference](../../cli/commands.md#appsbuildscreate).
