docs: update README to document devshell and Gitea CI/CD release workflow

This commit is contained in:
Lukas Holzner
2026-05-23 01:21:21 +02:00
parent a9abf93011
commit a368833ce7
+43 -10
View File
@@ -2,20 +2,53 @@
<img width="1200" height="475" alt="GHBanner" src="https://ai.google.dev/static/site-assets/images/share-ais-513315318.png" />
</div>
# Run and deploy your AI Studio app
# Munich Departures
This contains everything you need to run your app locally.
An Android application for Munich public transport departures, featuring devshell and automated Gitea CI/CD workflows.
View your app in AI Studio: https://ai.studio/apps/9c59cfb4-12a7-42ef-ae43-53c4408c63ad
## Run Locally
## Development Environment (Nix / Devbox)
**Prerequisites:** [Android Studio](https://developer.android.com/studio)
This project contains a Nix development shell setup (`flake.nix` & `devbox.json`) providing consistent tooling (JDK 17 and Android SDK Platform 36 / Build-tools 36.0.0).
### Entering the Devshell
If you have [direnv](https://direnv.net/) installed, it will automatically load when you enter this directory. Alternatively, you can use:
```bash
nix develop
# or
devbox shell
```
1. Open Android Studio
2. Select **Open** and choose the directory containing this project
3. Allow Android Studio to fix any incompatibilities as it imports the project.
4. Create a file named `.env` in the project directory and set `GEMINI_API_KEY` in that file to your Gemini API key (see `.env.example` for an example)
5. Remove this line from the app's `build.gradle.kts` file: `signingConfig = signingConfigs.getByName("debugConfig")`
6. Run the app on an emulator or physical device
### Build Commands
All Gradle commands should be run within the devshell environment:
- `nix develop -c ./gradlew build` - Build the entire project
- `nix develop -c ./gradlew assembleDebug` - Build debug APK
- `nix develop -c ./gradlew assembleRelease` - Build release APK
- `nix develop -c ./gradlew test` - Run all unit tests
## Local Setup
1. **Prerequisites**: [Android Studio](https://developer.android.com/studio) or the Nix development shell.
2. Create a file named `.env` in the project root directory and set your Gemini API key (see `.env.example` for details):
```env
GEMINI_API_KEY=your_gemini_api_key_here
```
3. Run the app on an emulator or physical device.
## Gitea CI/CD & Releases
The project features an automated Gitea release workflow configured in `.gitea/workflows/release.yml`.
### Creating a Release
To publish a new version:
1. Bump the `versionName` in `app/build.gradle.kts` (e.g. `versionName = "0.1.0"`) and increment the `versionCode`.
2. Commit the bump and push it:
```bash
git commit -am "chore(release): bump version to 0.1.0"
git push origin main
```
3. Create and push a tag matching `v*`:
```bash
git tag v0.1.0
git push origin v0.1.0
```
4. The Gitea Actions runner will detect the tag, build the release variant of the APK, rename it to `munich-departures-v0.1.0.apk`, and upload it directly to Gitea Releases.