buildshare.in
CI / CD

CircleCI

Distribute Android and iOS mobile builds automatically within CircleCI workflows using BuildShare CLI.

Integrate BuildShare into your CircleCI workflows to distribute test builds to your QA and testing teams automatically.


Prerequisites

  1. Add your BuildShare personal access token to CircleCI:
    • Navigate to Project Settings → Environment Variables.
    • Add an environment variable named BUILDSHARE_TOKEN.
  2. Commit buildshare.json or .buildshare.yaml to your repository root.

Integration Steps

Add the BuildShare installation and distribution steps to your .circleci/config.yml:

- run:
    name: Install BuildShare CLI
    command: curl -fsSL https://raw.githubusercontent.com/vishalkumardev/cli/main/install.sh | sh

- run:
    name: Upload to BuildShare
    command: |
      buildshare upload android \
        --ci \
        --json \
        --notes "CircleCI build #$CIRCLE_BUILD_NUM ($CIRCLE_BRANCH)"

Complete Workflow Example

version: 2.1

jobs:
  build-and-distribute:
    docker:
      - image: cimg/android:2024.01
    steps:
      - checkout
      - run:
          name: Build Release APK
          command: ./gradlew assembleRelease
      - run:
          name: Install BuildShare CLI
          command: curl -fsSL https://raw.githubusercontent.com/vishalkumardev/cli/main/install.sh | sh
      - run:
          name: Distribute to BuildShare
          command: |
            buildshare upload android \
              --ci \
              --json \
              --notes "CircleCI build #$CIRCLE_BUILD_NUM ($CIRCLE_SHA1)"

workflows:
  build-pipeline:
    jobs:
      - build-and-distribute:
          filters:
            branches:
              only:
                - main

On this page