CircleCI
Build your app in the job you already have, keep the .ipa, .apk or .aab in the workspace, and add one job that uploads it. The upload job runs in a small Node image, so it works the same for macOS and Linux builds.
1. Add your token
Create an API token under Dashboard, Settings, API tokens (Pro and Team). Project Settings, Environment Variables, add APPFORSHARE_TOKEN. To share it across projects, put it in a context and add the context to the job. The CLI reads it from the APPFORSHARE_TOKEN environment variable.
2. .circleci/config.yml
The build job saves the file with persist_to_workspace; the share job attaches the workspace and uploads it with the last commit message as release notes.
version: 2.1
jobs:
build:
# your build job as it is today
docker:
- image: cimg/android:2024.01
steps:
- checkout
- run: ./gradlew assembleRelease
- persist_to_workspace:
root: .
paths: [app/build/outputs/apk/release/app-release.apk]
share:
docker:
- image: cimg/node:lts
steps:
- checkout
- attach_workspace:
at: .
- run: |
npx --yes appforshare upload app/build/outputs/apk/release/app-release.apk \
--notes "$(git log -1 --pretty=%B)" --channel beta
workflows:
build-and-share:
jobs:
- build
- share:
requires: [build]Good to know
- For iOS, build on a macos executor with Xcode and export an ad hoc or enterprise .ipa, then persist it the same way. iPhones must be in the ad hoc profile; AppForShare can collect UDIDs and register them for you.
- 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 CircleCI orb?
- Not yet. The CLI is one command and needs only Node, so it runs in any image that has Node 18 or newer.
- Can I upload from the macOS job directly?
- Yes. Run the same npx command right after the export step and skip the second job. It needs Node 18 or newer on the image; install it with brew install node if it is missing.
Other CI systems
GitHub Actions and FastlaneGitLab CIBitbucket PipelinesJenkinsAzure PipelinesXcode CloudCodemagicBitriseExpo EAS