History

fix: self-update from the release site, not the private GitHub API

tx9 upgrade always reported 'no releases published yet' because internal/selfupdate queried api.github.com/repos/davis7dotsh/tx9/releases/latest, which returns 404 for anonymous clients on a private repo — indistinguishable from the genuine no-releases case. Point self-update at the same public release site the installer already uses (https://tx9.col-agents.com): /releases/latest for the version string, /releases/<version>/{tx9_<os>_<arch>,checksums.txt} for the assets. TX9_ORIGIN overrides the origin, matching scripts/install.sh. The latest version string is validated against the site's strict X.Y.Z shape before it is interpolated into a URL path. The GitHub release step in release.yml stays as a browsable archive; its comment now reflects that nothing consumes it programmatically.

Ben Davis committed 4 months ago

Commit c6f8a4b1 parent 73f7eba8 files · +170 −196Browse files

Showing the changes to .depot (1 of 8 files). Show all

Unified · Split

.depot/workflows/release.yml+6−4
@@ -4,11 +4,13 @@ name: release · 3 unmodified lines
44 # push a `vX.Y.Z` tag, get cross-compiled binaries + checksums.txt published
55 # to two places from one build:
66 #
7−# 1. A GitHub release — what `internal/selfupdate` (via `tx9 upgrade`)
8−# consumes.
7+# 1. A GitHub release — a browsable archive with generated release notes
8+# (not consumed programmatically: the repo is private, so the GitHub
9+# API 404s for anonymous clients).
910 # 2. The tx9-releases R2 bucket behind https://tx9.col-agents.com (site/) —
10−# what scripts/install.sh consumes: <version>/<asset> objects, plus a
11−# latest.txt version pointer flipped only after every asset uploads.
11+# what both scripts/install.sh and `tx9 upgrade` (internal/selfupdate)
12+# consume: <version>/<asset> objects, plus a latest.txt version
13+# pointer flipped only after every asset uploads.
1214 #
1315 # Runs on Depot CI (like check.yml). R2 upload needs two Depot CI secrets
1416 # scoped to this repo (`depot ci secrets add <NAME> --repo davis7dotsh/tx9`,