Skip to content
Mike Hardy edited this page Nov 20, 2025 · 27 revisions

This page describes how to release AnkiDroid. It can be interesting as an insight to understand the project better, or to improve the procedure.

Development lifecycle

There are three main phases the project alternates between (alpha, beta, stable).

We use a simple branching model where "main" (the default branch) contains the latest (unstable) development code, which is where all merge requests should be submitted. Alphas a released from main during this phase.

When we move into the "beta" phase of the development cycle, we create a branch "release-N.n" (N.n being the version code) which is only for important bug fixes. During this period, important bug fixes are cherry-picked from main on to the release branch by the development team into "release-N.n" (see below). Note that sometimes we follow a "delayed branch" optimization where do start releasing betas directly from main and continue doing so while normal main merge activity carries on. Only when a merge happens on main that might affect stability or introduce a regression do we branch, retroactively, on the commit prior to questionable change.

The first beta typically still goes to the 'alpha' ("Closed Testing" in Google terms) track (via the Triple-T Play Store Publisher plugin directives in AnkiDroid/build.gradle) and is then promoted to the "Open Testing" / 'beta' track manually in the Play Store Dashboard. Subsequent beta / public releases are typically released directly to the 'beta' track via changing that track directive in the build.gradle file

If an urgent bug is discovered shortly after a major release, commits will be added to that "release-N.n" branch and releases will be made from it.

Stable release procedure

Build

  • Update the changelog in the ankidroiddocs repository and/or the manual with notable changes - the tools/release.sh script will help you by enforcing this
  • Always use this repository: https://github.com/ankidroid/Anki-Android
  • Consider syncing translations from crowdin if they are still backwards compatible (no strings were deleted) - do this on main and cherry-pick -x commit-hash to the release branch

Merging new changes from main into a release or hotfix branch

Check out the release branch and using git on the command line cherry-pick -x commit-hash the commits from main that you want

GitHub Automated Publish Workflow

Crowdin / translations sync

  1. Run the Sync Translations Action
  • open that action
  • find the button on the right labeled "Run Workflow"
  • Run the workflow against the main branch
  1. Have someone review and approve the PR and merge it to main
  2. If no strings were deleted, and there is a release branch for the current release, then you may cherry-pick the i18n sync commit to the release branch as well, as it will be backwards-compatible. If strings were deleted then new strings must not be cherry-picked as the code will be looking for deleted strings and crash.

Cutting a new release branch / Starting betas

  1. Checkout the main branch and verify everything is working with a ./gradlew clean jacocoTestReport
  2. Make the branch, for example if you want release-2.14 you do a git co -b release-2.14
    1. If the build.gradle has not been switched to beta yet, edit AnkiDroid/build.gradle to switch the version from alphaNN to beta0, like this (the release script will handle taking it from 0 to 1 on the first run)
    2. If the build.gradle track has already been set to beta ("Open Testing" in Play Store terms), then after you push the branch you must switch main to alpha numbering on the next version, and switch it back to the alpha track ("Closed Testing") for play release, or the alpha builds will overwrite the beta ones
  3. Push the changes (for example if you are making release-2.14 - git push --set-upstream origin release-2.14)
  4. Now follow the "Publishing new versions" section here, but select the new branch you just pushed
  5. The first beta usually goes to the Google Play Store alpha testing group. Later (after the first beta survives alpha testing and you manually promote to beta) when you want to publish it automatically to the beta channel, you need to change the appropriate line to be beta instead of alpha: https://github.com/ankidroid/Anki-Android/blob/aa61add0360596ca3e0cbf967a652496aee1be49/AnkiDroid/build.gradle#L183

Publishing new versions

  1. Run the Publish Action
  • Open that action
  • Find the button on the right labeled "Run Workflow"
  • Run the workflow against the main branch for alphas, or the correct release branch for betas/public releases
  1. For public releases
  • make sure changelog.asc in ankidroiddocs has an entry for the new version on it's main branch or the release script will abort
  • go to the various stores (Google Play Store, Amazon App Store, Huawei AppGallery) and submit the new build for release

Clone this wiki locally