Repository navigation
Building and Releasing
| Variant | Use |
|---|---|
githubDebug |
Development; installs as …bookstorebd.debug next to the release app |
githubRelease |
The APK published on GitHub Releases, with the in-app updater |
playRelease |
Prepared for the Play Store: no install permission, updates come from Play |
Release builds are minified and shrunk with R8.
The version is set once, in app/build.gradle.kts:
val appVersionName = "0.7.0"The version code is derived from it (major * 10000 + minor * 100 + patch), so
it always increases with the version name.
The release keystore never enters the repository. Signing reads, in order:
- environment variables (
RELEASE_KEYSTORE_PATH,RELEASE_KEYSTORE_PASSWORD,RELEASE_KEY_ALIAS,RELEASE_KEY_PASSWORD), as GitHub Actions provides them from encrypted repository secrets; or - a local
keystore.propertiesfile, which is git-ignored.
Without either, release builds are produced unsigned, which is how CI checks
them on every push. Debug builds use the shared debug key in keystore/,
which is public by design.
-
Set the new
appVersionNameinapp/build.gradle.kts. -
Add release notes at
docs/release-notes/<version>.md. -
Commit, then tag and push:
git tag v0.2.0 git push origin v0.2.0
The release workflow
then checks that the tag matches the version, builds and signs the github
release, verifies the signing certificate's fingerprint, and publishes the APK
with its SHA-256 checksum and the release notes.
The website's /api/v1/app/config reports the latest release, read from this
repository's GitHub Releases and cached for 15 minutes. The github build:
- checks at most once a day, or when Account → Updates → Check is tapped;
- offers a newer release once, with its notes;
- downloads the APK and verifies its SHA-256 against the published checksum;
- hands it to Android's
PackageInstaller, which asks the person to confirm and accepts only an APK signed with the same certificate.
The server can also set a minimum supported version. A build below it shows an update screen, with the website as a way to keep shopping in the meantime.
BookStoreBD · Android app · MIT License · Questions: support.utsha@gmail.com
Using the app
Working on it
Links