ci: wait for nightly builds before publishing the release (#2695)

GITHUB_TOKEN-dispatched builds do not trigger downstream workflow_run
jobs. The nightly release check ran before builds finished and then
exited successfully without publishing anything.

Track dispatch run IDs and wait for all missing components to succeed.
Retry failed jobs once, account for delayed rerun state, and fail on
terminal errors. Bound the build and wait job to three hours.

Pass the built commit to publication so later main commits do not
change the release target. Retain component deduplication and manual
build completion handlers, and document the nightly lifecycle.

Add regression coverage for pending builds, retries, terminal failures,
dispatch races, and main advancing before publication. All 34 Node tests
and actionlint for the three nightly workflows pass.
This commit is contained in:
KKRainbow authored and GitHub committed 2026-10-14 09:57:54 +08:00
1 parent 76439ce562
commit 15a3d43039
8 files changed
+185 -36

No files matched your search

+9
View File
@@ -178,6 +178,15 @@ test('manual publication checks the current main commit', async () => {
assert.equal((await prepare(f)).sha, 'main-head');
});
test('scheduled publication uses the completed commit even after main advances', async () => {
const f = fixture();
f.context.payload = {};
const build = await prepare({ ...f, sha: 'built' });
assert.equal(build.sha, 'built');
assert.ok(f.calls.some(call => call[0] === 'compare' && call[1] === 'built...main-head'));
assert.deepEqual(build.runs, { core: 1, gui: 2, mobile: 3, test: 4 });
});
test('nightly requires a published version baseline and a mutable release', async () => {
const f = fixture();
f.state.releases = [];