ci(release): android-release is dispatch-only; a CI-created tag cannot wake it

Neither decoupled trigger fires on Forgejo 10.0.3: a tag created by the CI
(API or git push) is an Actions-user push and is not dispatched back into
Actions, and reusable workflows need Forgejo >= 12. The release procedure is
therefore two dispatches: release.yml, then android-release with that tag.
This commit is contained in:
sirius 2026-09-12 18:55:58 -04:00
commit 2cf055c1e8
No known key found for this signature in database
4 changed files with 73 additions and 50 deletions

View file

@ -37,7 +37,10 @@ created if the build or publish fails", and the dry-run path.
4. **Watch it.** The run name is `release`; `scripts/watch-release-run.sh`
reports job status (it reads `action_run`/`action_run_job` on the Pi's
database, so it works for dispatched runs as well as any other).
5. **Check the assets.** Open the release page (or
5. **Attach the Android assets.** Dispatch `android-release` with the tag the
core run just created — see [Android](#android-apk--aar-on-the-same-tag).
The Linux binaries land first; the APK build is the long pole.
6. **Check the assets.** Open the release page (or
`GET /api/v1/repos/sirius/onionwire/releases/tags/<tag>`) and require a
non-zero `size` for every asset: the two Linux binaries + `.sha256`, the
APK + `.sha256`, the AAR + `.sha256`. A green run is not proof — the Pi
@ -81,20 +84,35 @@ final step deletes the incomplete release and the tag. A failed `aarch64` or
## Android (APK + AAR) on the same tag
Creating the tag sends the same push notification a `git push` would, and
[`android-release.yml`](../.forgejo/workflows/android-release.yml) is
subscribed to `push: tags: v*.*.*`. The core workflow therefore does not call
it, and no `main`-push trigger exists on either file.
A release is **two dispatches**. After the core run has created the tag and
published the Linux binaries:
That run builds the signed APK and the SDK AAR on the **amd64** runner (the Pi
is aarch64 and cannot produce an APK), then a second job on the Pi attaches the
APK + AAR + `.sha256` to the same tag. If the release does not exist yet it is
created; if it exists it is joined (`publish-release.sh` is create-or-update).
Android assets land on the release a while after the Linux ones — the Android
build is the long pole.
1. Actions → **android-release** → *Run workflow*, `tag=vX.Y.Z` (the tag the
core just created; leave `dry_run` false).
2. Check the release again — the APK + AAR + `.sha256` are attached to the
**same** tag. If the release did not exist yet it is created; if it exists
it is joined (`publish-release.sh` is create-or-update).
The workflow also has `workflow_dispatch` with the same `tag` / `dry_run`
inputs, which is how you repair or re-attach the Android assets by hand.
`android-release.yml` has no automatic trigger, and that is deliberate. Both
candidate decoupled triggers were tried on this instance and neither fires:
- **A tag created by `release.yml` does not wake `push: tags: ['v*.*.*']`.**
Tried both ways — the tag created through `POST /tags`, and the tag created
by a real `git push` from the version job. Neither produced an
`android-release` run: pushes made with the CI's token are Actions-user
events, and Forgejo deliberately does not dispatch those back into Actions
(`services/actions/notifier_helper.go`: a doer that `IsActions()` is ignored).
Historically, *hand-pushed* tags did fire tag-filtered workflows, which is why
the trigger looked plausible.
- **`workflow_call` is unavailable.** Reusable workflows only appear in the
Forgejo docs from v12 onward; this instance reports
`10.0.3+gitea-1.22.0` (`GET /api/v1/version`), so a caller job with
`uses: ./.forgejo/workflows/android-release.yml` would never run. The
`workflow_call` block is left declared for the day the instance is upgraded.
The Android build runs on the **amd64** runner (the Pi is aarch64 and cannot
produce an APK), then a second job on the Pi attaches the assets. It is the
long pole of a release — the Linux binaries land first.
## Rebuilding an existing tag