ci(release): Sign and publish takes the launchers from Forgejo's own address, and Wine installs while they build #142

Merged
HumanBean merged 1 commit from HumanBean/LongshotLauncher:ci/release-faster into main 2026-11-16 11:31:39 +00:00
Owner

Why

A launcher nightly spends more time waiting than building. In nightly-100's run (#437), Sign and publish took 2 min 8 s, and 79 s of that was the download of the launchers' artifact (~188 MB) through Forgejo's public address behind Cloudflare: out over the home uplink and back in. The build job also installs Wine (~20 s) only after package.sh has finished.

What changed

  • scripts/release.py artifacts <folder> --run <run id> <name>... (the same command as Longshot's, MagicBeanDev/Longshot#1110): it fetches the run's named artifacts from FORGEJO_UPLOAD_API (Forgejo's own address on the quick runner's network, where artifacts are on its disk) and unpacks them. It refuses a missing or duplicated name and any entry that is not a plain file name, and writes nothing until every artifact is fetched.
  • release.yml, Sign and publish: a new first step uses it. The download-artifact steps run only if it failed (the fallback, with its retry).
  • release.yml, build job: Wine (installed in the background) starts the same apt commands detached, before package.sh. The Windows program starts waits for its status (10 min cap) and shows the apt log on failure.
  • tests/test_release.py: Artifacts, against a fake Forgejo on 127.0.0.1.

Measurements

Verdict: expected to save ~1.5 min per launcher release (~75 s in Sign and publish, ~20 s in the build job). The real number comes from the first nightly after merge, since the internal address can't be reached from my PC.

Testing

Tested: the same command in Longshot's copy against a real run's artifacts (Linux, public address): unpacked by name, and a missing name refused. The background-install pattern in a local shell: the first step returns at once and the status passes through. The workflow parses (PyYAML).

Not tested: tests/test_release.py (left to CI). Whether the job token may read the artifacts API: if it can't, the fallback runs as today.

Must be tested: the first nightly after merge: The launchers, from Forgejo's own address passes, and the download-artifact steps are skipped.

Note: main's nightly fails today, independently of this PR: run #448, App/FontCheck.cs(91,45): error IL3000 (Assembly.Location in a single-file publish), from #137.

Risks

If the artifacts API refuses the job token or answers differently, the release goes through the old download-artifact path. Revert the commit to undo. Nothing changes for players.

🤖 Generated with Claude Code

https://claude.ai/code/session_017vw8dzkpXRZ2cBAf7vu5YQ

## Why A launcher nightly spends more time waiting than building. In nightly-100's run ([#437](https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/actions/runs/437)), *Sign and publish* took 2 min 8 s, and 79 s of that was the download of the launchers' artifact (~188 MB) through Forgejo's public address behind Cloudflare: out over the home uplink and back in. The build job also installs Wine (~20 s) only after `package.sh` has finished. ## What changed - `scripts/release.py artifacts <folder> --run <run id> <name>...` (the same command as Longshot's, [MagicBeanDev/Longshot#1110](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1110)): it fetches the run's named artifacts from `FORGEJO_UPLOAD_API` (Forgejo's own address on the quick runner's network, where artifacts are on its disk) and unpacks them. It refuses a missing or duplicated name and any entry that is not a plain file name, and writes nothing until every artifact is fetched. - `release.yml`, *Sign and publish*: a new first step uses it. The `download-artifact` steps run only if it failed (the fallback, with its retry). - `release.yml`, build job: *Wine (installed in the background)* starts the same apt commands detached, before `package.sh`. *The Windows program starts* waits for its status (10 min cap) and shows the apt log on failure. - `tests/test_release.py`: `Artifacts`, against a fake Forgejo on 127.0.0.1. ## Measurements **Verdict:** expected to save ~1.5 min per launcher release (~75 s in *Sign and publish*, ~20 s in the build job). The real number comes from the first nightly after merge, since the internal address can't be reached from my PC. ## Testing **Tested:** the same command in Longshot's copy against a real run's artifacts (Linux, public address): unpacked by name, and a missing name refused. The background-install pattern in a local shell: the first step returns at once and the status passes through. The workflow parses (PyYAML). **Not tested:** `tests/test_release.py` (left to CI). Whether the job token may read the artifacts API: if it can't, the fallback runs as today. **Must be tested:** the first nightly after merge: *The launchers, from Forgejo's own address* passes, and the download-artifact steps are skipped. **Note:** main's nightly fails today, independently of this PR: run [#448](https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/actions/runs/448), `App/FontCheck.cs(91,45): error IL3000` (`Assembly.Location` in a single-file publish), from #137. ## Risks If the artifacts API refuses the job token or answers differently, the release goes through the old download-artifact path. Revert the commit to undo. Nothing changes for players. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017vw8dzkpXRZ2cBAf7vu5YQ
ci(release): Sign and publish takes the launchers from Forgejo's own address, and Wine installs while they build
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 4s
89a9c26fa5
Sign and publish fetched the launchers through Forgejo's public address behind Cloudflare: 79 s of its 127 (nightly-100).
scripts/release.py artifacts (as Longshot's) fetches the run's artifact from RELEASE_UPLOAD_API, the address on the quick
runner's network, where it is on Forgejo's disk; download-artifact stays as the fallback.

The build job installed Wine (about 20 s) after package.sh: it now installs in the background while package.sh builds,
and the --self-check step waits for it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dzkpXRZ2cBAf7vu5YQ
HumanBean changed title from WIP: ci(release): Sign and publish takes the launchers from Forgejo's own address, and Wine installs while they build to ci(release): Sign and publish takes the launchers from Forgejo's own address, and Wine installs while they build 2026-11-16 11:31:36 +00:00
HumanBean deleted branch ci/release-faster 2026-11-16 11:31:39 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/LongshotLauncher!142
No description provided.