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.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
fix(release): the template jobs had no submodules, and the mirror ran too early
yhhe379de5e2580
diff --git a/.github/workflows/mirror-release.yml b/.github/workflows/mirror-release.ymlindex 799e68fb7..8c617fe66 100644--- a/.github/workflows/mirror-release.yml+++ b/.github/workflows/mirror-release.yml@@ -9,9 +9,14 @@ name: Mirror a release# when a copy is missing, stale or wrong. That is what lets this run last, fail# without failing a release, and be pointed at a version published months ago.#-# Two ways in, one implementation: the release workflow calls it for the tag it just-# published, and a maintainer can run it by hand for any existing tag — which is how-# a release from before the mirror existed gets one.+# It runs when a release is PUBLISHED, not when a tag is pushed: this project's+# pipeline uploads into a draft that a maintainer reviews, and a draft cannot be+# downloaded by tag — the first run of this job found that out by failing with+# "release not found". Publication is also the honest moment: what gets mirrored is+# what people can already download.+#+# A maintainer can also run it by hand for any existing tag, which is how a release+# from before the mirror existed gets one.## Needs five secrets; without them every step skips and the release stays# GitHub-only: R2_ACCOUNT_ID, R2_ACCESS_KEY_ID, R2_SECRET_ACCESS_KEY, R2_BUCKET,@@ -19,6 +24,8 @@ name: Mirror a release# editor is pointed at (DEFAULT_RELEASE_MIRROR / ESTELLA_RELEASE_MIRROR).on:+ release:+ types: [published]workflow_call:inputs:tag:@@ -37,7 +44,7 @@ permissions:jobs:mirror:- name: Mirror ${{ inputs.tag }} to Cloudflare R2+ name: Mirror ${{ inputs.tag || github.event.release.tag_name }} to Cloudflare R2runs-on: ubuntu-latesttimeout-minutes: 30steps:@@ -51,7 +58,7 @@ jobs:if: steps.cfg.outputs.configured == 'true'env:GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}- TAG: ${{ inputs.tag }}+ TAG: ${{ inputs.tag || github.event.release.tag_name }}run: |mkdir -p mirrorgh release download "$TAG" --repo "$GITHUB_REPOSITORY" --dir mirror --clobber@@ -66,7 +73,7 @@ jobs:if: steps.cfg.outputs.configured == 'true'env:GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}- TAG: ${{ inputs.tag }}+ TAG: ${{ inputs.tag || github.event.release.tag_name }}run: |newest=$(gh release view --repo "$GITHUB_REPOSITORY" --json tagName -q .tagName)echo "newest release is $newest, mirroring $TAG"@@ -83,7 +90,7 @@ jobs:ENDPOINT: https://${{ secrets.R2_ACCOUNT_ID }}.r2.cloudflarestorage.comBUCKET: ${{ secrets.R2_BUCKET }}PUBLIC_BASE: ${{ secrets.R2_PUBLIC_BASE }}- TAG: ${{ inputs.tag }}+ TAG: ${{ inputs.tag || github.event.release.tag_name }}IS_LATEST: ${{ steps.latest.outputs.is_latest }}run: |version="${TAG#v}"@@ -106,7 +113,7 @@ jobs:if: steps.cfg.outputs.configured == 'true'env:PUBLIC_BASE: ${{ secrets.R2_PUBLIC_BASE }}- TAG: ${{ inputs.tag }}+ TAG: ${{ inputs.tag || github.event.release.tag_name }}run: |version="${TAG#v}"echo "### Mirrored \`$TAG\`" >> "$GITHUB_STEP_SUMMARY"diff --git a/.github/workflows/release-desktop.yml b/.github/workflows/release-desktop.ymlindex a3e90ee36..54579d37d 100644--- a/.github/workflows/release-desktop.yml+++ b/.github/workflows/release-desktop.yml@@ -106,7 +106,12 @@ jobs:runs-on: ${{ matrix.os }}timeout-minutes: 120steps:+ # With submodules: the host links box2d, spine and glm from third_party, and+ # a checkout without them fails at configure with a directory that has no+ # CMakeLists.txt — which is exactly how this job failed the first time it ran.- uses: actions/checkout@v7+ with:+ submodules: recursive- uses: ./.github/actions/setup@@ -274,13 +279,6 @@ jobs:desktop/release/*.dmgretention-days: 3- # The copy on Cloudflare R2, so a download is not GitHub's speed for everyone far- # from it. One implementation, in its own workflow, because the same job has to be- # runnable by hand for a release published before the mirror existed.- mirror:- needs: [publish-templates, release]- if: github.event_name == 'push' && !cancelled() && needs.release.result == 'success'- uses: ./.github/workflows/mirror-release.yml- with:- tag: ${{ github.ref_name }}- secrets: inherit+ # The mirror is NOT here: it follows `release: published`, because the assets it+ # copies live in a draft until a maintainer publishes it, and a draft cannot be+ # downloaded by tag. See mirror-release.yml.