Docs
A channel for each pull request
Reviewers install the change from the pull request itself. Each pull request gets a channel named pr-<number> with one stable link and QR code; every push puts the new build into it, and the channel is deleted when the pull request closes. Pro and Team.
1. Store a token
Make an API token in Dashboard, Settings, API tokens (upload only is enough) and save it as the repository secret APPFORSHARE_TOKEN.
2. Add pr-channel to the Action
Run the workflow on opened, synchronize, reopened and closed. Give the job pull-requests: write for the comment and deployments: write for the GitHub Deployment; a refused deployment is only a warning. Skip the build steps on closed: then the Action only deletes the channel.
on: pull_request: types: [opened, synchronize, reopened, closed] jobs: android: runs-on: ubuntu-latest permissions: contents: read pull-requests: write deployments: write steps: - uses: actions/checkout@v4 if: github.event.action != 'closed' # ... build the app, also with: if: github.event.action != 'closed' ... - uses: appforshare/appforshare-action@v1 with: file: app/build/outputs/apk/release/app-release.apk token: ${{ secrets.APPFORSHARE_TOKEN }} pr-comment: true pr-channel: true3. Review from the comment
The pull request comment shows the channel link and QR code next to the install links and the store readiness result, and a GitHub Deployment in the appforshare environment points at the channel. The channel page shows "PR #N: title", synced from the pull request on each upload.
4. Close the pull request
On closed, the Action deletes the pr-<number> channel, uploads nothing and marks the pull request's deployments inactive. The builds stay and follow normal expiry and automatic clean up. The comment stays on the pull request.
Other CI and the CLI
In any step, npx appforshare upload --pr-channel does the same with GITHUB_TOKEN in the environment. On Codemagic the CLI reads CM_PULL_REQUEST_NUMBER and CM_REPO_SLUG (GitHub repositories). channel list shows the channels of an app, pull request channels included; channel delete --pr removes them by hand.
npx appforshare upload app-release.apk --pr-channel --pr-comment
npx appforshare channel list --app com.acme.shop
npx appforshare channel delete --pr 128 --yesLimits
Pull request channels do not count toward the channels of an app. Each plan keeps a number of them (see Pricing); at the cap, the pull request channel with the oldest build is deleted first. Pull requests from forks get a read only token and no secrets, so nothing is uploaded there. The MCP tool list_channels reads the channels; it cannot delete them.
Questions
- Which plan do I need?
- Pro or Team. Uploads with a token are on Pro and Team.
- What if I forget to run the workflow on closed?
- The channel stays until you delete it with appforshare channel delete --pr <n> --yes, or until the cap removes the oldest one.
- Do iOS and Android share the channel?
- Yes, when the projects are paired: an iOS job and an Android job fill the same channel and the same comment.
- Does it work with GitLab merge requests?
- Not as a pull request channel. Use --channel with the branch name to keep one channel per branch.
See also: Pull request channels, Upload from CI, Beta and Live channels, Automatic clean up.