diff --git a/Incido Development Plan.txt b/Incido Development Plan.txt index 513a595..df02813 100644 --- a/Incido Development Plan.txt +++ b/Incido Development Plan.txt @@ -522,6 +522,39 @@ adb install -r incido--debug.apk have to type it — `./gradlew assembleRelease` has already deposited both stamped APKs at the repo root by the time you reach it.) +### 11.5 Re-running a failed release + +**Never "Re-run" a red release run.** A tag push pins the workflow file to +that tag's own commit, so a re-run replays the workflow as it was when the +tag was cut — even after `main` has been fixed. It is also destructive: the +release step deletes each stale asset before re-uploading it, so a retry that +dies mid-step leaves the release with *fewer* assets than it started with. +(This is exactly what happened to v0.3.8.1 run 78, twice, over a `cp` bug +already patched on `main`.) + +Instead, dispatch the workflow from `main`, which runs `main`'s current +workflow against an existing tag: + +```bash +# Gitea: POST .../actions/workflows/release.yml/dispatches (expect 204) +curl -s -X POST \ + -H "Authorization: token $TOKEN" -H 'Content-Type: application/json' \ + -d '{"ref":"main","inputs":{"tag":"v0.3.8.1"}}' \ + http://192.168.8.17:3000/api/v1/repos/nick/incido/actions/workflows/release.yml/dispatches +``` + +Equivalently: Actions → "release" → Run workflow → branch `main` → tag input. +The job reuses the existing release entry, refreshes its description, and +re-attaches both APKs and `Incido--changes.md`. + +Two API gotchas found the hard way: a run's **task id is not its run number** +(`GET /actions/runs//logs` 404s; logs live at +`GET /actions/jobs//logs`), and job logs echo the whole script before +executing it, so grep below the last `::endgroup::` to see real output. + +If CI cannot attach the changelog file at all, `scripts/ci/backfill-release-notes.sh ` +patches description + notes asset after the fact (idempotent, never touches the APKs). + --- ## Appendix A — Key Library Versions (for the version catalog)