Skip to content

GitLab CI ​

Store APPBARN_TOKEN as a masked/protected CI variable and upload after the build job creates the artifact.

yaml
upload_appbarn:
  script:
    - npm install --global appbarn-cli
    - appbarn config set api https://staging.api.app-barn.com
    - appbarn config set app "$APPBARN_APP_ID"
    - appbarn config set environment "$APPBARN_ENVIRONMENT_ID"
    - appbarn upload ./build/app.apk --app-identifier "$APPBARN_APP_IDENTIFIER" --version "$APPBARN_VERSION" --build-number "$APPBARN_BUILD_NUMBER"

AppBarn detects GitLab CI provenance from standard CI variables. Do not echo the token or place it in command arguments.

AI prompt — Add a GitLab CI upload (Copilot, Codex, Cursor)
text
Inspect .gitlab-ci.yml and included pipelines. Add an AppBarn upload after the selected IPA/APK/AAB is available, preserving artifact dependencies. Install appbarn-cli, configure the API and real App/Environment UUIDs, and upload the artifact. Read APPBARN_TOKEN from a masked CI variable (protected where appropriate); use non-secret variables for IDs and Android identity. Do not echo secrets. Ask about unclear jobs or configuration, validate YAML and report the required variables.

Common failures ​

Ensure the upload job receives the build artifact, masked variables are available on the branch, and the Automation Token scope covers the selected App.