Skip to content

Commit 91f88dc

Browse files
committed
ci: address review on the rehearsal gates
Two comments, both correct. The macOS note still said manual runs "stay free to build unsigned", which this change had just made false, and the Windows note described unsigned artifacts as an outcome rather than a failure. Both now describe what the run actually does. The test only looked for the tag condition, so `if: github.event_name == 'workflow_dispatch'` would satisfy it while skipping the tag path — the same hole entered from the other side. It now rejects any condition on those steps, and that scenario fails it.
1 parent 0b1a2c9 commit 91f88dc

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

.github/workflows/desktop-release.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,10 @@ jobs:
184184
echo 'No macOS signing certificate configured; building unsigned.'
185185
fi
186186
187-
# A tag build that quietly produces an unsigned app is worse than a failed
187+
# A build that quietly produces an unsigned app is worse than a failed
188188
# one: macOS rejects unsigned updates, so it ships a release users cannot
189-
# install or update from. Manual runs stay free to build unsigned.
189+
# install or update from. Manual runs are held to the same bar, which is
190+
# what makes them a rehearsal rather than a smoke test.
190191
- name: Require signing
191192
working-directory: apps/desktop
192193
run: node --import tsx scripts/assert-release-signing.ts
@@ -316,9 +317,9 @@ jobs:
316317
working-directory: apps/desktop
317318
run: node --import tsx scripts/stage-runtime.ts
318319
319-
# Only non-empty WIN_CSC_* signing secrets are exported. Without them,
320-
# Windows artifacts are unsigned and installers trigger a SmartScreen
321-
# warning on first run.
320+
# Only non-empty WIN_CSC_* signing secrets are exported. Without them the
321+
# artifacts are unsigned and installers trigger a SmartScreen warning, so
322+
# the credential check below fails the run rather than shipping one.
322323
- name: Resolve Windows signing credentials
323324
shell: bash
324325
env:

apps/desktop/tests/desktop-release-workflow.spec.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ describe('desktop release workflow', () => {
5555
const stepIndex = workflow.indexOf(step)
5656
expect(stepIndex).toBeGreaterThan(-1)
5757
const precedingStep = workflow.lastIndexOf(' - name:', stepIndex)
58-
expect(workflow.slice(precedingStep, stepIndex)).not.toContain('refs/tags/desktop-v')
58+
// Any condition at all, not just a tag test, would skip one trigger:
59+
// `github.event_name == 'workflow_dispatch'` reintroduces the same hole
60+
// from the other side. These steps must be unconditional.
61+
const declaration = workflow.slice(precedingStep, stepIndex)
62+
expect(declaration).not.toMatch(/^\s+if:/mu)
5963
}
6064
})
6165

0 commit comments

Comments
 (0)