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 dry run signs the way the release does, and a gate holds it
esengine0f51c41b9f9d
diff --git a/.github/workflows/release-desktop.yml b/.github/workflows/release-desktop.ymlindex 0f8eb84a3..0b6ee0153 100644--- a/.github/workflows/release-desktop.yml+++ b/.github/workflows/release-desktop.yml@@ -374,8 +374,11 @@ jobs:# fails — `set-key-partition-list` calls the passphrase wrong before anything# is signed — while the same secrets signed fine on 20260707.563. So the# keychain is stood up here, where its password is known, and handed over.+ # BOTH legs: the dry run's own comment calls itself "signed and notarized like+ # the real thing", and gating this to a tag push made it the one leg that+ # signed by another mechanism — and the one nobody had ever run.- name: Stand up the signing keychain- if: matrix.platform == 'macos-latest' && github.event_name == 'push'+ if: matrix.platform == 'macos-latest'shell: bashenv:MAC_CSC_LINK: ${{ secrets.MAC_CSC_LINK }}@@ -439,10 +442,10 @@ jobs:- name: Package desktop app (dry run, no publish)if: github.event_name != 'push'env:- # macOS only — see the publish step above for why the Windows leg must- # never see a certificate meant for the other platform.- CSC_LINK: ${{ matrix.platform == 'macos-latest' && secrets.MAC_CSC_LINK || '' }}- CSC_KEY_PASSWORD: ${{ matrix.platform == 'macos-latest' && secrets.MAC_CSC_KEY_PASSWORD || '' }}+ # CSC_LINK is declared on NEITHER leg, for the reasons the publish step+ # gives: macOS signs out of the CSC_KEYCHAIN above, and this leg handing+ # electron-builder the .p12 instead failed on set-key-partition-list —+ # a rehearsal of a mechanism the release does not use.APPLE_ID: ${{ matrix.platform == 'macos-latest' && secrets.APPLE_ID || '' }}APPLE_APP_SPECIFIC_PASSWORD: ${{ matrix.platform == 'macos-latest' && secrets.APPLE_APP_SPECIFIC_PASSWORD || '' }}APPLE_TEAM_ID: ${{ matrix.platform == 'macos-latest' && secrets.APPLE_TEAM_ID || '' }}diff --git a/tools/check-workflows.mjs b/tools/check-workflows.mjsindex 35bfa38cf..701ab504a 100644--- a/tools/check-workflows.mjs+++ b/tools/check-workflows.mjs@@ -19,7 +19,7 @@* workspace tooling, the job used the composite setup action, before that step,* with its install. Everything else about a workflow is left alone.*/-import { readdirSync, readFileSync } from 'node:fs';+import { readdirSync, readFileSync, existsSync } from 'node:fs';import path from 'node:path';import { fileURLToPath } from 'node:url';import { GATES, SCOPES } from './gates.mjs';@@ -205,6 +205,37 @@ if (shellViolations.length > 0) {process.exit(1);}+/**+ * The two packaging legs of a release sign by ONE mechanism. The dry run calls+ * itself "signed and notarized like the real thing"; gated to a tag push, the+ * keychain it signs out of was stood up on only one of them, and the other+ * handed electron-builder the .p12 through CSC_LINK and died unlocking it. So a+ * rehearsal rehearsed a mechanism the release does not use, and only a dispatch+ * could ever find out.+ */+const RELEASE_WF = 'release-desktop.yml';+const signing = [];+if (existsSync(path.join(WORKFLOWS, RELEASE_WF))) {+ const text = readFileSync(path.join(WORKFLOWS, RELEASE_WF), 'utf8');+ const keychain = /- name: Stand up the signing keychain\n\s+if: ([^\n]+)/.exec(text);+ if (!keychain) {+ signing.push('no "Stand up the signing keychain" step — the signing mechanism cannot be located');+ } else if (/event_name/.test(keychain[1])) {+ signing.push(`the signing keychain is gated on the event (${keychain[1].trim()}) — then one`+ + ' packaging leg signs by another mechanism, and it is the leg nobody runs');+ }+ for (const m of text.matchAll(/^\s+CSC_LINK:/gm)) {+ signing.push(`CSC_LINK is declared at character ${m.index} — neither leg may: macOS signs out`+ + ' of the keychain, and on Windows it would sign the installer with an Apple certificate');+ }+}+if (signing.length > 0) {+ console.error(`\n✗ the release's two packaging legs do not sign the same way:\n`);+ for (const v of signing) console.error(` ${RELEASE_WF}: ${v}`);+ console.error('\nA dry run is a rehearsal only if it rehearses what the release does.\n');+ process.exit(1);+}+if (violations.length > 0) {console.error(`\n✗ ${violations.length} workflow step(s) run workspace tooling with no install:\n`);for (const v of violations) {@@ -219,3 +250,4 @@ if (violations.length > 0) {console.log('✓ every workflow step that runs workspace tooling installs it first');console.log('✓ every windows-capable step that speaks POSIX shell says which shell it wants');console.log(`✓ ${GATES.length} static gate(s) in one list; CI runs it through run-gates.mjs`);+console.log('✓ the release\'s dry run signs by the same mechanism its publish does');