ci: publish releases to Gitea instead of GitHub
Build / build (push) Successful in 48s

The workflow was written for github.com: actions/upload-artifact failed on
the Gitea runner, softprops/action-gh-release only talks to the GitHub API,
and gen-manifest.js hardcoded github.com URLs.

- drop the artifact upload (release assets are the deliverable)
- upload release assets with tools/release-gitea.js, a dependency-free
  Gitea API client; re-running a tag replaces the attachments
- gen-manifest.js takes --server/PUBLIC_SERVER_URL and knows that Gitea
  spells the latest-asset URL /releases/download/latest/<file>
- PUBLIC_SERVER_URL is set explicitly because the runner only sees the
  instance's internal LAN address

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Rene Kievits
2026-09-05 22:41:03 +02:00
co-authored by Claude Opus 5
parent b137bf9eda
commit bf2daac146
4 changed files with 208 additions and 34 deletions
+17 -5
View File
@@ -54,12 +54,13 @@ settings from the backup it made.
Add the repository once — *Homebrew Channel → Settings → Add repository*:
```
https://github.com/<owner>/<repo>/releases/latest/download/apps.json
```text
https://git.crylia.de/Crylia/lg_update_blocker/releases/download/latest/apps.json
```
The app then shows up in the Homebrew Channel list, and every new release you
tag is picked up automatically (that URL always points at the newest release).
The app then shows up in the Homebrew Channel list, and every new release that
is tagged is picked up automatically — Gitea resolves `.../download/latest/...`
to the newest release.
### Manually
@@ -125,7 +126,8 @@ npm run deploy # ares-install the resulting ipk
## Releasing
`.github/workflows/release.yml` builds on every push. Tag a commit `v<version>`
[.github/workflows/release.yml](.github/workflows/release.yml) builds on every
push (Gitea Actions reads `.github/workflows/` too). Tag a commit `v<version>`
(matching `version` in `package.json`) and the workflow additionally publishes a
release containing:
@@ -135,6 +137,16 @@ release containing:
* `apps.json` — the one-package repository index used by the repository URL above
* `description.html` — the long description shown in the Homebrew Channel
Uploading is done by [tools/release-gitea.js](tools/release-gitea.js) against
the Gitea API (`softprops/action-gh-release` only speaks to github.com). It is
idempotent: re-running a tag reuses the release and replaces the attachments.
The URLs inside the manifest come from `PUBLIC_SERVER_URL` in the workflow, not
from `GITHUB_SERVER_URL` — the runner is handed the instance's internal LAN
address, which the TV cannot reach. Change that one variable if the instance
moves. Generating for github.com instead works too: `--server` (or
`PUBLIC_SERVER_URL`) switches the "latest release asset" URL to GitHub's shape.
The app id lives in exactly one place: the `name` field of `package.json`.
Change it there and everything (appinfo, service name, Luna URIs, manifest)
follows.