[eric] ci: fail the release if the signed installer or app isnt actually signed and notarized

This commit is contained in:
Eric
2026-05-27 19:11:12 -07:00
parent 7192b27e44
commit 1cf401b393
2 changed files with 26 additions and 0 deletions
+13
View File
@@ -93,6 +93,19 @@ jobs:
bash scripts/build-app.sh --sign
fi
# Gatekeeper gate: after build-app.sh signs + notarizes, prove the shipped
# .app is codesign-valid (--deep --strict), Gatekeeper-accepted (spctl
# --assess), and carries a stapled notarization ticket. An app that built but
# didn't notarize launches to a Gatekeeper block on every user's Mac, so that
# must fail the release here. --require-signed exits non-zero unless all hold.
# NOTE: like the rest of this workflow, this mac path is unverified locally
# (no Mac on hand); first exercise it via workflow_dispatch publish=false.
- name: Verify the shipped app is signed + notarized
shell: bash
run: |
set -euo pipefail
node scripts/ci/verify-signature.js --require-signed
- name: Upload artifact (non-publish runs)
if: github.event_name == 'workflow_dispatch' && github.event.inputs.publish != 'true'
uses: actions/upload-artifact@v4
+13
View File
@@ -132,6 +132,19 @@ jobs:
}
if ($LASTEXITCODE -ne 0) { throw "build-app-win.ps1 failed ($LASTEXITCODE)" }
# SmartScreen gate: after electron-builder + the Azure sign hook run, prove
# the bits we are about to ship are ACTUALLY Authenticode-Valid. An unsigned
# installer trips SmartScreen on every user's first launch, so a release that
# silently didn't sign (missing secrets, hook skip) must fail here, not ship.
# verify-signature.js --require-signed exits non-zero unless Status == Valid.
- name: Verify the shipped artifact is signed
shell: pwsh
run: |
node scripts/ci/verify-signature.js --require-signed --target electron/dist/win-unpacked/OpenSwarm.exe
if ($LASTEXITCODE -ne 0) { throw "inner OpenSwarm.exe is not validly signed" }
node scripts/ci/verify-signature.js --require-signed --target electron/dist/OpenSwarm-Setup-x64.exe
if ($LASTEXITCODE -ne 0) { throw "OpenSwarm-Setup-x64.exe (installer) is not validly signed" }
- name: Upload artifact (non-publish runs)
if: github.event_name == 'workflow_dispatch' && github.event.inputs.publish != 'true'
uses: actions/upload-artifact@v4