buildshare.in
CI / CD

Overview

Automate mobile app build distribution in continuous integration and delivery pipelines with BuildShare CLI.

Because the BuildShare CLI is a single compiled binary with zero runtime dependencies, integrating it into continuous integration and delivery pipelines requires only downloading the binary and running buildshare upload.

Project Configuration in CI

Uploads require authentication and a valid projectId. If your repository contains a committed buildshare.json or buildshare.yaml, you can simply run buildshare upload android --ci --json or buildshare upload ios --ci --json. Alternatively, pass --app <projectId> via pipeline secrets.


Authentication in CI

To authenticate without interactive prompts in automated environments:

Generate Access Token

Generate a Personal Access Token from your BuildShare account settings.

Configure Secret Variable

Add the token as an encrypted secret in your CI repository settings named BUILDSHARE_TOKEN.

Provide to Pipeline Steps

Export BUILDSHARE_TOKEN in your pipeline environment. The CLI automatically reads this variable to authenticate all API requests.


Core CI Integration Steps

Every CI/CD pipeline integration follows two simple steps:

# 1. Download and install the CLI binary
curl -fsSL https://raw.githubusercontent.com/vishalkumardev/cli/main/install.sh | sh
export PATH="$HOME/.local/bin:$PATH"

# 2. Upload using non-interactive mode
buildshare upload android --ci --json

Parsing CI Outputs

When --json is supplied, output is printed as structured JSON. You can extract values using jq to verify the build status or log the build ID in your pipeline logs:

# Example: Extract the uploaded build ID using jq
BUILD_ID=$(buildshare upload android --ci --json | jq -r '.build.id')
echo "Build uploaded successfully: $BUILD_ID (testers notified via email)"

CI / CD Providers

Explore detailed setup guides and pipeline recipes for your provider:

On this page