fix(release): decide channels from every page and never fail after publishing

The release step decided :latest and the releases repository's content
after the Gitea release was already public, and could then fail or decide
wrongly (owner review 2, phase 1 review):

- Re-publishing v0.1.0-rc.1 or rc.2 builds Chronos.Tools from the tag,
  which has no release-channels: the step failed after publishing and the
  image job never ran. Any failure to decide (a tag older than the
  command, an unreadable page, a body that is not a list) now warns and
  moves no channel, so the version's image is still pushed.
- Only the first page (50, newest first) of releases was read, and
  pre-releases now share it with stable ones: 50 pre-releases after a
  stable release hid it and moved :latest to a pre-release. The workflow
  reads every page up to the first empty one (at most 100) and
  release-channels takes one --releases file per page (Args.GetAll).
- The Version step accepted tags release-channels refuses (v01.2.0), which
  then failed only after publishing. It now uses release-channels' SemVer
  2.0 pattern without +BUILD, and a test keeps the two in step.

BRIEF §19.3, DECISIONS, CHANGELOG and README step 5 say so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-10-26 23:22:10 +01:00
1 parent a34b33d50b
commit b2aeb2f587
8 files changed
+129 -40

No files matched your search

+16 -12
View File
@@ -1246,7 +1246,8 @@ third-party actions at all (amended 2026-10-23, R3).
### 19.3 `release.yml` (tag `v*`, or manual re-publish of an existing tag; amended 2026-10-23, R3; amended 2026-10-26, R1)
Job `release`, in the SDK container: the version from the tag
(`vMAJOR.MINOR.PATCH[-PRERELEASE]`) passed as `-p:ChronosVersion`, with
(`vMAJOR.MINOR.PATCH[-PRERELEASE]`, SemVer 2.0 as `release-channels` reads it, checked
before anything is built) passed as `-p:ChronosVersion`, with
`-p:ChronosReleasesUrl` (the releases repository's address, §18); build and the Linux
tests; self-contained single-file win-x64 publish of App and Uploader (ReadyToRun), Server
and Setup (ReadyToRun), cross-compiled on Linux; `Chronos.Tools pe-check` (GUI subsystem,
@@ -1258,17 +1259,20 @@ installers `Chronos-Setup-<ver>.exe` (components Chronos, Uploader, Server) and
(`Chronos.Tools changelog` from Conventional Commits) and `SHA256SUMS`; the Gitea release
made by `Chronos.Tools gitea-release` (a draft first, every file uploaded and its size
verified, then published). Then `Chronos.Tools release-channels` decides what the tag moves
(amended 2026-10-26, R1): it reads the target repository's published releases
(`releases?draft=false&limit=50`), stable and pre-releases alike, ignores drafts and tags
that are not `v` + SemVer 2.0, always counts the tag itself, takes a release Gitea flags as
a pre-release for one, and compares by SemVer 2.0 precedence (not Gitea's
`releases/latest`, which is the most recently created release; equal precedence counts as
highest). `latest` is true for the highest stable release and moves the releases
repository's content (§19.4); `image_latest` is true for the highest stable release or,
while no stable release exists, the highest pre-release, and moves `:latest`. Re-publishing
an older tag, or a pre-release once a stable release exists, moves neither. Then job
`image`, in the runner's default image with the docker CLI and the host's daemon: it builds
`linux/amd64` only (arm64 would need QEMU on the host) and pushes
(amended 2026-10-26, R1): it reads every page of the target repository's published releases
(`releases?draft=false&limit=50&page=<n>` up to the first empty page, at most 100), stable
and pre-releases alike, ignores drafts and tags that are not `v` + SemVer 2.0, always counts
the tag itself, takes a release Gitea flags as a pre-release for one, and compares by
SemVer 2.0 precedence (not Gitea's `releases/latest`, which is the most recently created
release; equal precedence counts as highest). `latest` is true for the highest stable
release and moves the releases repository's content (§19.4); `image_latest` is true for
the highest stable release or, while no stable release exists, the highest pre-release,
and moves `:latest`. Re-publishing an older tag, or a pre-release once a stable release
exists, moves neither. When the channels cannot be decided (a page unreadable or not a
list, or a tag older than `release-channels`, whose own `Chronos.Tools` lacks it) the tag
moves neither, with a warning. Then job `image`, in the runner's default image with the
docker CLI and the host's daemon: it builds `linux/amd64` only (arm64 would need QEMU on
the host) and pushes
`gitea.encke-hake.ts.net/balbosoft/chronos-server:<ver>`, plus `:latest` when `image_latest`
is true. Pushing needs the repository secret `REGISTRY_TOKEN`, an access token of a user who
can write the owner's packages (scope "package: read and write"): the workflow's own token