Some checks failed
Forgejo Release Builder / release (push) Failing after 5s
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2 KiB
Executable file
2 KiB
Executable file
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_JSONGOOGLE_CLIENT_SECRETS_JSONSIGNING_KEYALIASKEY_STORE_PASSWORDKEY_PASSWORD
secrets.GITHUB_TOKEN is used as the Forgejo-provided built-in token for the release API calls.
Runner label
The workflow uses:
runs-on: forgejo-release
Register a runner with a matching label. Host mode is the simplest option for Android builds:
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:
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
- Enable Actions on the Forgejo instance and repository.
- Register the
forgejo-releaserunner. - Add the required repository secrets.
- Push a test tag such as
v0.0.0-forgejo.1. - 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.