Pushing a v* tag builds the normal and FOSS APKs, signed with the upload key, and attaches them to a Gitea release; a manual run on a branch uploads a test build to the repo's packages. Everything runs on the Gitea server: a builder image with the Android SDK, an act_runner registered only for this repo, and plain shell steps (no third-party actions). The build itself is apps/mobile/scripts/build-android.sh, the same script for hand builds. Setup steps are in docs/ANDROID-CI.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3.1 KiB
Releasing on F-Droid
The Android app can be built with no closed-source code: MUSICSHARE_FOSS=1 leaves out Google's ML
Kit / Play Services barcode scanner that expo-camera normally bundles, and the QR scanner then decodes
camera snapshots with jsQR instead (apps/mobile/src/lib/qrSnapshot.ts). Everything else in the app
is already open source. Expo's native modules are built from source rather than from Expo's
precompiled AARs (expo.autolinking.android.buildFromSource in apps/mobile/package.json), which
F-Droid requires and which is also what lets the scanner be switched off. Release builds without our signing key come out unsigned, which is what
F-Droid wants: it signs with its own key.
What's in the repo for this
LICENSE: AGPL-3.0 (also set in everypackage.json).fastlane/metadata/android/en-US/: the store listing F-Droid shows (title, descriptions, icon, changelogs, screenshots).fdroid/tech.chrisedwards.musicshare.yml: a draft of the build recipe for fdroiddata.apps/mobile/app.config.ts: theMUSICSHARE_FOSS=1switch (turns off expo-camera's ML Kit scanner).
Before submitting
- Publish the source somewhere public, such as Codeberg (popular with F-Droid apps) or GitHub,
and put its URL in place of
PUBLIC_REPO_URLin the recipe. - Add screenshots: 2-8 portrait PNGs in
fastlane/metadata/android/en-US/images/phoneScreenshots/named1.png,2.png, and so on. - Tag the release:
git tag v1.0.0 && git push --tags. F-Droid builds from tags. - Check the FOSS build yourself:
cd apps/mobile MUSICSHARE_FOSS=1 CI=1 npx expo prebuild --platform android --clean --no-install cd android && ./gradlew :app:assembleRelease # nothing from Google's closed-source libraries should be inside: unzip -l app/build/outputs/apk/release/app-release*.apk | grep -iE 'mlkit|gms' || echo clean
Submitting
- Fork https://gitlab.com/fdroid/fdroiddata, copy the recipe to
metadata/tech.chrisedwards.musicshare.yml. - Test it with
fdroid readmeta,fdroid lint tech.chrisedwards.musicshareandfdroid build -v -l tech.chrisedwards.musicshare(fdroidserver, or their Docker image). - Open a merge request. Reviewers often ask for changes to how Node is installed or how npm dependencies are fetched for React Native apps; that's normal.
The listing will carry the NonFreeNet anti-feature, because the app can connect to Spotify, Apple Music, Last.fm and Plex. That's expected and doesn't block inclusion.
Releasing an update
- Bump
versionandandroid.versionCodeinapps/mobile/app.json. - Add
fastlane/metadata/android/en-US/changelogs/<versionCode>.txt. - Commit, tag
v<version>, push the tag. F-Droid picks it up automatically (AutoUpdateMode). Our own server builds the signed APKs for the same tag (seedocs/ANDROID-CI.md).
IzzyOnDroid (faster alternative)
IzzyOnDroid's repository lists apps from signed APKs attached to releases, usually within days, and F-Droid's client can add it. Attach the APK built with our key (or the FOSS build) to each release on the public repo and request inclusion at https://gitlab.com/IzzyOnDroid/repo.