AppForShareGet a token

Upload from CI

Bitrise

Bitrise build steps export the file path for you: BITRISE_IPA_PATH, BITRISE_APK_PATH or BITRISE_AAB_PATH. Add a Script step after the build step that uploads it.

1. Add your token

Create an API token under Dashboard, Settings, API tokens (Pro and Team). Workflow Editor, Secrets, add APPFORSHARE_TOKEN. The CLI reads it from the APPFORSHARE_TOKEN environment variable.

2. Script step

GIT_CLONE_COMMIT_MESSAGE_SUBJECT is the first line of the commit message, set by the Git Clone step.

#!/usr/bin/env bash
set -e
npx --yes appforshare upload "$BITRISE_IPA_PATH" \
  --notes "$GIT_CLONE_COMMIT_MESSAGE_SUBJECT" --channel beta

Good to know

  • Use $BITRISE_APK_PATH or $BITRISE_AAB_PATH for Android builds.
  • Add --channel beta to keep one stable link for testers, and --fail-on blocked to stop the pipeline when the store readiness check finds a blocker (exit code 2; the build stays uploaded).
  • The command prints the install link. Add --json for url, slug, version and channel as JSON. All options are on Upload from CI.

Questions

Is there a Bitrise step in the step library?
Not yet. The Script step above does the same.
Can the readiness check fail the workflow?
Yes. Add --fail-on blocked and the step fails with exit code 2 when the check finds a blocker.

Other CI systems

GitHub Actions and FastlaneCircleCIGitLab CIBitbucket PipelinesJenkinsAzure PipelinesXcode CloudCodemagicExpo EAS