ci: put the launcher's update pointer in a release, and delete the dist branch
Some checks failed
CI / linux-portable (push) Failing after 3m22s
CI / windows-gate (push) Successful in 5m27s
CI / release (push) Has been skipped

The dist branch existed to carry ~120 MB payloads that could not go on main.
Once payloads became release attachments it held one 500-byte manifest.json,
so it was a whole branch for a reason that no longer applied.

The pointer is now a release asset too: each publish recreates a one-asset
 release naming the versioned build. Forgejo has no
/releases/latest/download/ route (404), so a pointer is still required — but
keeping it in a release means nothing about distribution lives in git: no
payload branch, no bot commits on main, and no push that could retrigger the
pipeline (which is why writing the manifest to main was not the answer either).

Recreating the tag deletes the old release AND its tag; the tag outlives its
release and would otherwise block recreation.

Versioned releases are retained, so older builds stay downloadable.
tools/publish-dist.ps1 is removed — publishing is CI's job now.
This commit is contained in:
Erik 2026-08-19 14:40:41 +02:00
parent 353231fe6e
commit ff01423f3f
6 changed files with 87 additions and 218 deletions

View file

@ -24,16 +24,23 @@ public sealed class ReleaseManifestClient : IReleaseManifestClient, IDisposable
public const int MaximumRedirects = 5;
/// <summary>
/// Alpha distribution feed: the public Gitea repository's <c>dist</c>
/// branch, served as raw files (anonymous raw reads verified 2026-08-18,
/// so a friend needs no account). GitHub stays private, and its 100 MB
/// per-file limit could not carry the launcher payload anyway, so the
/// payloads live on <c>dist</c> — pushed to Gitea only — instead of on
/// <c>main</c>. <c>tools/publish-bin.ps1</c> builds them and
/// <c>tools/publish-dist.ps1</c> publishes that branch.
/// Alpha distribution feed: the manifest asset of the fixed <c>latest</c>
/// release on the public Gitea repo (anonymous reads verified, so a friend
/// needs no account). Every build publishes a versioned release carrying
/// the payloads, then republishes this one-asset <c>latest</c> release as
/// the pointer to it.
///
/// <para>
/// A pointer is required because Forgejo has no
/// <c>/releases/latest/download/</c> route (verified: 404), so there is no
/// built-in stable URL for "the newest release". Keeping the pointer as a
/// release asset means nothing about distribution lives in git: no payload
/// branch, no bot commits on <c>main</c>, and no build loop to guard
/// against.
/// </para>
/// </summary>
public static Uri ProductionManifestUri { get; } = new(
"https://git.snakedesert.se/erik/acdream/raw/branch/dist/bin/manifest.json");
"https://git.snakedesert.se/erik/acdream/releases/download/latest/manifest.json");
private static readonly JsonSerializerOptions SerializerOptions = new()
{