komikku/docs/forgejo-release-runner.md

79 lines
2 KiB
Markdown
Raw Permalink Normal View History

# Forgejo release runner
This repository now includes a Forgejo-native release workflow at `.forgejo/workflows/build_release.yml`.
## What it does
- Triggers on tags matching `v*`
- Builds the release APKs
- Signs the APKs
- Creates or updates a draft release through the Forgejo API
- Uploads the APKs and a zipped ProGuard mapping as release assets
The workflow intentionally avoids GitHub-only artifact and release actions so it can run on Forgejo with a self-hosted runner.
## Required repository secrets
Set these secrets in the Forgejo repository settings:
- `GOOGLE_SERVICES_JSON`
- `GOOGLE_CLIENT_SECRETS_JSON`
- `SIGNING_KEY`
- `ALIAS`
- `KEY_STORE_PASSWORD`
- `KEY_PASSWORD`
`secrets.GITHUB_TOKEN` is used as the Forgejo-provided built-in token for the release API calls.
## Runner label
The workflow uses:
```yaml
runs-on: forgejo-release
```
Register a runner with a matching label. Host mode is the simplest option for Android builds:
```sh
forgejo-runner register \
--instance https://192.168.1.155:3030 \
--token <registration-token> \
--name komikku-release \
--labels "forgejo-release:host"
```
## Runner prerequisites
Install these on the runner host before enabling the workflow:
- Git
- curl
- zip
- Python 3
- JDK 17
- Android SDK command-line tools
- Android platform `android-35`
- Android build-tools `35.0.1`
Recommended environment variables on the runner host:
```sh
export ANDROID_HOME=/opt/android-sdk
export ANDROID_SDK_ROOT=/opt/android-sdk
export PATH="$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools:$PATH"
```
## Suggested setup flow
1. Enable Actions on the Forgejo instance and repository.
2. Register the `forgejo-release` runner.
3. Add the required repository secrets.
4. Push a test tag such as `v0.0.0-forgejo.1`.
5. Open the draft release in Forgejo and verify the uploaded APKs.
## Notes
- The existing GitHub workflows under `.github/workflows/` remain unchanged.
- The Forgejo release notes are generated from git history, so they do not depend on the GitHub compare API.