Skip to content

ci: add workflow to build parallel bisect apk#20388

Open
Ankita562 wants to merge 1 commit intoankidroid:mainfrom
Ankita562:feature/20169-bisect-apk
Open

ci: add workflow to build parallel bisect apk#20388
Ankita562 wants to merge 1 commit intoankidroid:mainfrom
Ankita562:feature/20169-bisect-apk

Conversation

@Ankita562
Copy link

@Ankita562 Ankita562 commented Mar 4, 2026

Purpose / Description

Adds a new manual GitHub Actions workflow to generate a parallel "bisect" APK from any specific commit hash.

This provides maintainers with a tool to easily build and share specific historical APKs with users to bisect longstanding issues that cannot be reproduced locally, without requiring local compilation.

Fixes

Approach

  • Created .github/workflows/build-bisect-apk.yml utilizing the workflow_dispatch trigger.
  • Added a required commit_hash text input for the maintainer to specify the exact point in history to build.
  • Uses actions/checkout@v4 to travel to the specified ${{ inputs.commit_hash }}.
  • Runs ./gradlew assembleFullRelease -PcustomSuffix=.bisect -PcustomName="Anki Bisect" to generate the APK. This dynamically changes the applicationId so it installs cleanly alongside the user's main app without overwriting their actual flashcard data.
  • Automatically falls back to the test/debug keystore so production signing keys are not used or exposed.
  • Uses actions/upload-artifact@v4 to securely deliver the resulting .apk to the GitHub Actions dashboard.

How Has This Been Tested?

I pushed this workflow to my personal fork, manually triggered it via the Actions tab, and provided a recent commit hash. The workflow successfully checked out the specific commit, built the assembleFullRelease APK with the injected Gradle properties, and successfully uploaded the .zip artifact containing the parallel APK. All standard AnkiDroid CI checks (Unit Tests, Lint, etc.) also passed successfully on this branch.

Learning (optional, can help others)

Learned how to bridge GitHub Actions (workflow_dispatch inputs) with Android build systems by passing custom Gradle properties (-P) directly through the terminal command to dynamically override the applicationIdSuffix and app_name.

Checklist

Please, go through these checks before submitting the PR.

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

@Ankita562 Ankita562 force-pushed the feature/20169-bisect-apk branch from 7edffba to 5d16cf0 Compare March 4, 2026 10:29
@Fandroid745
Copy link
Contributor

This is not a ui change, so you should uncheck that from the pr checklist.

@david-allison
Copy link
Member

Could you show the output on your branch?

@Ankita562 Ankita562 force-pushed the feature/20169-bisect-apk branch from 5d16cf0 to 52d92ca Compare March 4, 2026 18:02
@Ankita562
Copy link
Author

Could you show the output on your branch?

https://github.com/Ankita562/Anki-Android/actions/runs/22682583500
i tested the workflow in my fork and it built the parallel apk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tool to create a debug apk from a commit hash

3 participants