> For the complete CircleCI developer hub index, see [llms.txt](https://circleci.com/developer/llms.txt)

# circleci/app-distribution

The easiest way to distribute your mobile applications all inside CircleCI


## Commands

### comment_bitbucket_pr

Comment to Bitbucket Pull Request including QR Code, only available Bitbucket Cloud.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `repo_slug` | string |  | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.
 |
| `token` | env_var_name | BITBUCKET_TOKEN | Enter the name of the environment variable containing the Bitbucket Access token to be used for authentication. If not specified, BITBUCKET_TOKEN environment variable will be used. https://support.atlassian.com/bitbucket-cloud/docs/access-tokens/
 |
| `workspace` | string |  | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.
 |

### comment_github_pr

Comment to GitHub Pull Request including QR Code


| Parameter | Type | Default | Description |
|---|---|---|---|
| `hostname` | string | github.com | Specify the hostname of the GitHub instance to authenticate with.
 |
| `token` | env_var_name | GITHUB_TOKEN | Enter the name of the environment variable containing the GitHub Personal Access token to be used for authentication. It is recommended for CI processes that you create a "machine" user on GitHub.com with the needed permissions, rather than using your own.
 |
| `version` | string | 2.40.1 | Specify the version of GitHub CLI which should be full semver versioned tag.
 |

### comment_gitlab_mr

Comment to GitLab Merge Request including QR Code


| Parameter | Type | Default | Description |
|---|---|---|---|
| `hostname` | string |  | Specify the hostname of the GitLab instance to authenticate with if self-managed(Example: gitlab.example.com). Don't specify if you are using GitLab Cloud.
 |
| `token` | env_var_name | GITLAB_TOKEN | Enter the name of the environment variable containing the GitLab Personal Access token to be used for authentication. If not specified, GITLAB_TOKEN environment variable will be used.
 |

### notify_slack

Notify to Slack channel. The environment variables SLACK_ACCESS_TOKEN, and SLACK_DEFAULT_CHANNEL must be set for this orb to work. Please refer to this document how to generate SLACK_ACCESS_TOKEN: https://github.com/CircleCI-Public/slack-orb/wiki/Setup.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `branch_pattern` | string | .+ | A comma separated list of regex matchable branch names. Notifications will only be sent if sent from a job from these branches. By default ".+" will be used to match all branches. Pattern must be a POSIX expression and match the full string, no partial matches.
 |
| `channel` | string | $SLACK_DEFAULT_CHANNEL | Select which channel in which to post to. Channel name or ID will work. You may include a comma separated list of channels if you wish to post to multiple channels at once. Set the "SLACK_DEFAULT_CHANNEL" environment variable for the default channel.
 |
| `circleci_host` | string | https://circleci.com | CircleCI Host (used as the base for the Workflow URL)
 |
| `debug` | boolean | false | Enable to view full payload being sent to Slack and response being received from the API call. Redacted content can be viewed by re-running the job with SSH and accessing the log files referenced in the job output. When run in a persistent build environment such as CircleCI Runner, these debug log files may remain in the system's temporary filesystem indefinitely and accumulate over time.
 |
| `event` | enum | pass | In what event should this message send? Options: ["fail", "pass", "always"]
 |
| `ignore_errors` | boolean | true | Ignore errors posting to Slack. Disable to catch initial setup errors. Re-enable to prevent Slack errors from affecting your pipeline.
 |
| `invert_match` | boolean | false | Invert the branch and tag patterns. If set to true, notifications will only be sent if sent from a job from branches and tags that do not match the patterns.
 |
| `mentions` | string |  | Exports to the "$SLACK_PARAM_MENTIONS" environment variable for use in templates. Mention users via the @ symbol: "@USER" If the username contains a space, the Slack ID must be used with angled brackets: "<@U8XXXXXXX>"
 |
| `step_name` | string | Slack - Sending Notification | Specify a custom step name for this command, if desired
 |
| `tag_pattern` | string | .+ | A comma separated list of regex matchable tag names. Notifications will only be sent if sent from a job from these branches. By default ".+" will be used to match all tags. Pattern must match the full string, no partial matches.
 |

### upload_android

Distribute an Android app by uploading the binary(aab, apk)


| Parameter | Type | Default | Description |
|---|---|---|---|
| `path` | string |  | Path of your app binary |

### upload_ios

Distribute an iOS app by uploading the binary(ipa)


| Parameter | Type | Default | Description |
|---|---|---|---|
| `path` | string |  | Path of your app binary |
| `token` | env_var_name | CIRCLECI_CLI_TOKEN | Enter the name of the environment variable containing either CircleCI's Personal token or Project token. https://circleci.com/docs/managing-api-tokens/
 |

## Examples

### upload_android

Distribute an Android app by uploading the binary(aab, apk)


```yaml
version: '2.1'
orbs:
  android: circleci/android@3.0.1
  app-distribution: circleci/app-distribution@1.0.0
jobs:
  distribute_debug:
    executor:
      name: android/android-docker
    steps:
      - checkout
      - android/restore-gradle-cache
      - run: ./gradlew buildDebug
      - android/save-gradle-cache
      - app-distribution/upload_android:
          path: app/build/outputs/apk/debug/app-debug.apk
      - app-distribution/comment_github_pr
      - app-distribution/notify_slack:
          channel: test
workflows:
  android-workflow:
    jobs:
      - distribute_debug
```

### upload_ios

Distribute an iOS app by uploading the binary(ipa)


```yaml
version: '2.1'
orbs:
  app-distribution: circleci/app-distribution@1.0.0
  ruby: circleci/ruby@2.3.0
jobs:
  distribute_debug:
    macos:
      xcode: 14.3.1
    resource_class: macos.m1.large.gen1
    steps:
      - checkout
      - ruby/install-deps
      - run: bundle exec fastlane beta
      - app-distribution/upload_ios:
          path: CircleCIDemo.ipa
      - app-distribution/comment_github_pr
      - app-distribution/notify_slack:
          channel: test
workflows:
  ios-workflow:
    jobs:
      - distribute_debug
```