Skip to content

A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.

fix(ci): the released-projects check can see the releases

esengine4d8c2ab592bd
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 279e0439c..06a5c50e9 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -272,6 +272,11 @@ jobs:
steps:
- uses: actions/checkout@v7
+ with:
+ # verify-legacy reads examples out of RELEASE TAGS (git archive v0.20.0
+ # …), which a shallow checkout has none of — the step failed on every run
+ # that ever reached it.
+ fetch-depth: 0
- uses: ./.github/actions/setup
diff --git a/tools/verify-legacy.mjs b/tools/verify-legacy.mjs
index ff0429a4c..173375bad 100644
--- a/tools/verify-legacy.mjs
+++ b/tools/verify-legacy.mjs
@@ -42,7 +42,14 @@ function extract(tag, id, into) {
const archive = spawnSync('git', ['archive', tag, `examples/${id}`], {
cwd: ROOT, encoding: 'buffer', maxBuffer: 1 << 28,
});
- if (archive.status !== 0) return `no examples/${id} at ${tag}`;
+ if (archive.status !== 0) {
+ // Saying "the example is not there" of a clone that never fetched the tag
+ // sends the reader looking in the wrong place — which is where this spent
+ // its whole CI life, on a checkout with no tags at all.
+ const known = spawnSync('git', ['rev-parse', '--verify', `${tag}^{commit}`], { cwd: ROOT, encoding: 'utf8' });
+ if (known.status !== 0) return `cannot resolve ${tag} — an unknown tag, or a checkout fetched without tags`;
+ return `no examples/${id} at ${tag}`;
+ }
const untar = spawnSync('tar', ['-x', '-C', into, '--strip-components=2'], { input: archive.stdout });
if (untar.status !== 0) return `could not unpack ${id} at ${tag}`;
return existsSync(path.join(into, 'project.esproject')) ? null : `${tag} has no project.esproject for ${id}`;