ci(release): wait for the mirrored tag, never mint it

The Codeberg publish has never once succeeded — 0.2.1, 0.2.2, 0.3.0, 0.3.1
and 0.3.2 all failed, and 0.3.0 was published by hand. Neither previous fix
could have worked, because the cause isn't in this file: ref writes to
jlmakiola/agendula on Codeberg fail. A tag push returns "cannot lock
references" and POST /tags returns an empty-bodied 500, while the identical
calls succeed on jlmakiola/calendula with the same token. Creating a release
mints a tag, so it inherited the same failure.

Attaching a release to a tag that is ALREADY there needs no ref write and
returns 201. So split the responsibility the way it should have been: the
push mirror owns delivering the tag, this step only attaches to it. Poll for
the tag, then POST with no target_commitish so the API attaches rather than
resolves a commit and mints one. If the tag never lands, fail with a pointer
at the mirror instead of trying to create it.

Drop continue-on-error. It reported green across five releases that never
published, which is how 0.3.1's crash fix reached F-Droid while the Codeberg
and Obtainium users who hit the crash got nothing.

Tested against the live API before committing (unlike its predecessors):
tag-present attaches 201, tag-absent exits 1 with the diagnostic. Note this
does not by itself restore publishing — the mirror cannot write the v0.3.2
tag either, so Codeberg must repair the repo's ref store first.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-20 19:50:57 +02:00
parent bc70ed3a9f
commit 36beb2d0ad
4 changed files with 43 additions and 24 deletions

1
cb-response.json Normal file
View File

@@ -0,0 +1 @@
{"id":10985210,"tag_name":"v0.3.1","target_commitish":"","name":"v0.3.1","body":"### Fixed\n- Agendula no longer crashes on launch. Every 0.3.0 install was affected: the\n release build stripped a constructor that the background-work scheduler needs\n to open its database, and that happens before the app draws anything.\n\n","url":"https://codeberg.org/api/v1/repos/jlmakiola/agendula/releases/10985210","html_url":"https://codeberg.org/jlmakiola/agendula/releases/tag/v0.3.1","tarball_url":"https://codeberg.org/jlmakiola/agendula/archive/v0.3.1.tar.gz","zipball_url":"https://codeberg.org/jlmakiola/agendula/archive/v0.3.1.zip","hide_archive_links":false,"upload_url":"https://codeberg.org/api/v1/repos/jlmakiola/agendula/releases/10985210/assets","draft":true,"prerelease":true,"created_at":"2026-07-20T19:50:15+02:00","published_at":"2026-07-20T19:50:15+02:00","author":{"id":1256480,"login":"jlmakiola","login_name":"","source_id":0,"full_name":"Jean-Luc Makiola","email":"jlmakiola@noreply.codeberg.org","avatar_url":"https://codeberg.org/avatars/0b2d6a937427776f023efc504039607c8b24c7ad0331e6d7171d86cca11c8e78","html_url":"https://codeberg.org/jlmakiola","language":"","is_admin":false,"last_login":"0001-01-01T00:00:00Z","created":"2026-06-22T10:25:16+02:00","restricted":false,"active":false,"prohibit_login":false,"location":"Germany","pronouns":"he/him","website":"https://jeanlucmakiola.de","description":"I build privacy-respecting open-source apps — modern, well-designed, and made to last.","visibility":"public","followers_count":2,"following_count":0,"starred_repos_count":0,"username":"jlmakiola"},"assets":[],"archive_download_count":{"zip":0,"tar_gz":0}}