Skip to content

VoiceStudio is the open-source, fully-local ElevenLabs alternative — voice cloning, voice design, video dubbing, dictation, transcription & audiobook creation in 646 languages.

ci(release): verify each platform's signing and list it in the release notes

velixio9ed16c0763bb
diff --git a/.github/workflows/electron-release.yml b/.github/workflows/electron-release.yml
index 6444e6077..ac4de24b8 100644
--- a/.github/workflows/electron-release.yml
+++ b/.github/workflows/electron-release.yml
@@ -219,6 +219,52 @@ jobs:
$signature = Get-AuthenticodeSignature $installer.FullName
if ($signature.Status -ne 'Valid') { throw "Installer signature is not trusted: $($installer.Name)" }
}
+ # Measure what each leg actually ships; the release notes are built from these
+ # reports. v0.5.7-beta.1 shipped a macOS bundle whose signing was skipped silently.
+ - name: Report and enforce macOS signing
+ if: matrix.platform == 'darwin'
+ env:
+ HAS_CREDENTIALS: ${{ secrets.ELECTRON_MACOS_CSC_LINK != '' }}
+ run: |
+ APP=$(find electron/release -maxdepth 2 -name VoiceStudio.app -type d -print -quit)
+ test -n "$APP" || { echo "No VoiceStudio.app to verify"; exit 1; }
+ # An invalid bundle signature makes browser downloads open as "damaged".
+ codesign --verify --deep --strict "$APP" || { echo "macOS bundle signature is invalid"; exit 1; }
+ if codesign -dvv "$APP" 2>&1 | grep -q '^Authority=Developer ID Application:' && xcrun stapler validate "$APP"; then
+ STATUS=notarized
+ elif [ "$HAS_CREDENTIALS" = true ]; then
+ echo "Developer ID credentials are configured but the app is not signed and notarized with them"; exit 1
+ else
+ STATUS=adhoc
+ fi
+ mkdir -p electron/release-signing
+ printf '{"platform":"darwin","arch":"%s","status":"%s"}\n' "${{ matrix.arch }}" "$STATUS" > "electron/release-signing/signing-darwin-${{ matrix.arch }}.json"
+ - name: Report and enforce Windows signing
+ if: matrix.platform == 'win32'
+ shell: pwsh
+ env:
+ HAS_CREDENTIALS: ${{ secrets.ELECTRON_WINDOWS_CSC_LINK != '' }}
+ run: |
+ $installers = @(Get-ChildItem electron/release/VoiceStudio-Electron-*.exe)
+ if ($installers.Count -eq 0) { throw "No installer to verify" }
+ $unsigned = @($installers | Where-Object { (Get-AuthenticodeSignature $_.FullName).Status -ne 'Valid' })
+ if ($unsigned.Count -eq 0) { $status = 'signed' }
+ elseif ($env:HAS_CREDENTIALS -eq 'true') { throw "Windows signing is configured but these installers are not validly signed: $($unsigned.Name -join ', ')" }
+ else { $status = 'unsigned' }
+ New-Item -ItemType Directory -Force electron/release-signing | Out-Null
+ Set-Content "electron/release-signing/signing-win32-${{ matrix.arch }}.json" ('{"platform":"win32","arch":"${{ matrix.arch }}","status":"' + $status + '"}')
+ - name: Report Linux signing
+ if: matrix.platform == 'linux'
+ run: |
+ mkdir -p electron/release-signing
+ printf '{"platform":"linux","arch":"%s","status":"not-applicable"}\n' "${{ matrix.arch }}" > "electron/release-signing/signing-linux-${{ matrix.arch }}.json"
+ - name: Save the signing report
+ uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
+ with:
+ name: electron-signing-${{ matrix.platform }}-${{ matrix.arch }}
+ retention-days: 14
+ if-no-files-found: error
+ path: electron/release-signing/signing-*.json
- name: Packaged startup smoke test
working-directory: electron
run: |
@@ -276,16 +322,13 @@ jobs:
gh release download "$SUNSET_TAG" --pattern latest.json --dir release-assets
gh release download "$SUNSET_TAG" --pattern latest-user.json --dir release-assets
python3 scripts/prepare_electron_release.py --assets release-assets --tag "$TAG" --sunset-tag "$SUNSET_TAG"
- - name: Disclose explicitly accepted unsigned artifacts
- if: inputs.allow_unsigned == true
- run: |
- cat >> release-assets/RELEASE_NOTES.md <<'EOF'
-
- ### Electron installer trust
- These Electron installers are unsigned or ad-hoc signed and are not Apple-notarized.
- Windows/macOS may show trust warnings. macOS automatic updates are unverified;
- use manual installer updates. Tauri updater signatures remain independently verified.
- EOF
+ - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
+ with:
+ pattern: electron-signing-*
+ merge-multiple: true
+ path: release-signing
+ - name: Describe installer signing per platform
+ run: python3 scripts/release_signing_notes.py release-signing >> release-assets/RELEASE_NOTES.md
- name: Create or update draft
run: |
# A beta is always a prerelease so GitHub never makes it `latest`.
diff --git a/docs/RELEASING.md b/docs/RELEASING.md
index 23296b353..bc1ab0d80 100644
--- a/docs/RELEASING.md
+++ b/docs/RELEASING.md
@@ -146,8 +146,13 @@ only the workflow definition comes from `main`.
Dispatch `electron-release.yml` for the exact tag with `publish=true`. Signing
and notarization are required by default. The owner may explicitly set
-`allow_unsigned=true`; the workflow then adds the installer-trust disclosure to
-the release notes. Never select that exception without the owner's decision.
+`allow_unsigned=true`. Never select that exception without the owner's decision.
+Every build, published or not, verifies what each platform leg actually ships
+and the release notes end with an **Installer signing** table built from those
+checks (✅ signed and notarized, ⚠️ unsigned or ad hoc, with what users will
+see). A macOS bundle with an invalid signature always fails, and a platform
+whose signing credentials are configured fails if its installers are not signed
+with them, even with `allow_unsigned=true`.
The owner can delegate it: accounts listed in the `UNSIGNED_RELEASE_PUBLISHERS`
Actions variable (comma-separated logins, Settings → Secrets and variables →
Actions → Variables; only admins can edit it) may also dispatch or re-run an
@@ -194,10 +199,10 @@ type the tag name.
`publish=true`. It lists which platforms have signing secrets (macOS needs the
Developer ID and notarization set, Windows needs `ELECTRON_WINDOWS_CSC_LINK` and
its password) and, for any platform without them, stops unless you explicitly
- accept shipping that platform unsigned. The dispatch's `allow_unsigned` flag is
- all-or-nothing: with it, the workflow also skips its macOS signature check even
- where macOS signing is configured, and the release notes carry the generic
- unsigned disclosure.
+ accept shipping that platform unsigned. The dispatch's `allow_unsigned` flag
+ only accepts platforms without credentials: a platform with signing configured
+ must still produce signed installers, and the notes' **Installer signing**
+ table shows each platform's measured result.
- `--publish vX.Y.Z[-beta.N]` (`make release-publish TAG=…`) publishes an existing
draft build later.
- `--dry-run` (`make release-dry`) prints the plan and changes nothing.
diff --git a/scripts/release_signing_notes.py b/scripts/release_signing_notes.py
new file mode 100644
index 000000000..b9092499e
--- /dev/null
+++ b/scripts/release_signing_notes.py
@@ -0,0 +1,52 @@
+#!/usr/bin/env python3
+"""Render the release notes' installer-signing table from the package job's reports.
+
+Each package leg verifies its own installers after building and writes
+`signing-<platform>-<arch>.json` with the status it measured, so the notes say
+what shipped rather than what the workflow intended.
+"""
+import argparse
+import json
+from pathlib import Path
+
+PLATFORMS = [
+ ("darwin", "arm64", "macOS (Apple Silicon)"),
+ ("darwin", "x64", "macOS (Intel)"),
+ ("win32", "x64", "Windows x64"),
+ ("win32", "arm64", "Windows ARM64"),
+ ("linux", "x64", "Linux x64"),
+]
+
+STATUS = {
+ "notarized": "✅ Signed with Developer ID and notarized by Apple",
+ "adhoc": "⚠️ Not Developer ID signed: macOS may refuse to open it from a browser download; use the shell installer, and update manually",
+ "signed": "✅ Signed",
+ "unsigned": "⚠️ Unsigned: SmartScreen shows \"Windows protected your PC\"; choose More info → Run anyway",
+ "not-applicable": "— Linux packages are not code-signed",
+}
+
+
+def render(reports_dir: Path) -> str:
+ reports = {}
+ for path in sorted(reports_dir.glob("signing-*.json")):
+ report = json.loads(path.read_text())
+ if report["status"] not in STATUS:
+ raise ValueError(f"Unknown signing status in {path.name}: {report['status']}")
+ reports[(report["platform"], report["arch"])] = report["status"]
+ rows = [(label, reports[(platform, arch)]) for platform, arch, label in PLATFORMS if (platform, arch) in reports]
+ unknown = set(reports) - {(platform, arch) for platform, arch, _ in PLATFORMS}
+ if unknown or not rows:
+ raise ValueError(f"Unexpected signing reports: {sorted(unknown) or 'none'}")
+ lines = ["", "### Installer signing", "", "| Platform | Signing |", "|---|---|"]
+ lines += [f"| {label} | {STATUS[status]} |" for label, status in rows]
+ return "\n".join(lines) + "\n"
+
+
+def main() -> None:
+ parser = argparse.ArgumentParser(description=__doc__)
+ parser.add_argument("reports", type=Path)
+ print(render(parser.parse_args().reports), end="")
+
+
+if __name__ == "__main__":
+ main()
diff --git a/tests/test_release_signing_notes.py b/tests/test_release_signing_notes.py
new file mode 100644
index 000000000..663035893
--- /dev/null
+++ b/tests/test_release_signing_notes.py
@@ -0,0 +1,73 @@
+"""Release notes describe the signing each platform leg measured (v0.5.7-beta.1 follow-up)."""
+
+import importlib.util
+import json
+from pathlib import Path
+
+import pytest
+import yaml
+
+ROOT = Path(__file__).resolve().parents[1]
+SPEC = importlib.util.spec_from_file_location("release_signing_notes", ROOT / "scripts/release_signing_notes.py")
+notes = importlib.util.module_from_spec(SPEC)
+SPEC.loader.exec_module(notes)
+
+
+def write(tmp_path, platform, arch, status):
+ (tmp_path / f"signing-{platform}-{arch}.json").write_text(
+ json.dumps({"platform": platform, "arch": arch, "status": status})
+ )
+
+
+def test_table_lists_each_platform_with_its_measured_status(tmp_path):
+ write(tmp_path, "linux", "x64", "not-applicable")
+ write(tmp_path, "win32", "x64", "unsigned")
+ write(tmp_path, "darwin", "arm64", "notarized")
+ write(tmp_path, "darwin", "x64", "adhoc")
+ text = notes.render(tmp_path)
+ rows = [line for line in text.splitlines() if line.startswith("| ") and "Platform" not in line]
+ assert [row.split(" | ")[0] for row in rows] == [
+ "| macOS (Apple Silicon)", "| macOS (Intel)", "| Windows x64", "| Linux x64",
+ ]
+ assert "✅ Signed with Developer ID and notarized" in rows[0]
+ assert rows[1].count("⚠️") == 1 and "shell installer" in rows[1]
+ assert "SmartScreen" in rows[2]
+ assert "### Installer signing" in text
+
+
[email protected]("platform,arch,status", [("darwin", "arm64", "signed-ish"), ("plan9", "x64", "signed")])
+def test_unknown_reports_fail_instead_of_rendering(tmp_path, platform, arch, status):
+ write(tmp_path, platform, arch, status)
+ with pytest.raises(ValueError):
+ notes.render(tmp_path)
+
+
+def test_missing_reports_fail(tmp_path):
+ with pytest.raises(ValueError):
+ notes.render(tmp_path)
+
+
+def load_workflow():
+ return yaml.load((ROOT / ".github/workflows/electron-release.yml").read_text(), Loader=yaml.BaseLoader)
+
+
+def test_every_package_leg_reports_and_mac_check_ignores_allow_unsigned():
+ steps = {step.get("name"): step for step in load_workflow()["jobs"]["package"]["steps"]}
+ mac = steps["Report and enforce macOS signing"]
+ # Runs on every macOS build, published or not, and allow_unsigned cannot skip it.
+ assert mac["if"] == "matrix.platform == 'darwin'"
+ assert 'codesign --verify --deep --strict "$APP"' in mac["run"]
+ assert mac["env"]["HAS_CREDENTIALS"] == "${{ secrets.ELECTRON_MACOS_CSC_LINK != '' }}"
+ windows = steps["Report and enforce Windows signing"]
+ assert windows["if"] == "matrix.platform == 'win32'"
+ assert windows["env"]["HAS_CREDENTIALS"] == "${{ secrets.ELECTRON_WINDOWS_CSC_LINK != '' }}"
+ assert steps["Report Linux signing"]["if"] == "matrix.platform == 'linux'"
+ assert steps["Save the signing report"]["with"]["name"] == "electron-signing-${{ matrix.platform }}-${{ matrix.arch }}"
+
+
+def test_release_notes_are_built_from_the_reports():
+ steps = load_workflow()["jobs"]["release"]["steps"]
+ describe = next(step for step in steps if step.get("name") == "Describe installer signing per platform")
+ assert "if" not in describe
+ assert describe["run"] == "python3 scripts/release_signing_notes.py release-signing >> release-assets/RELEASE_NOTES.md"
+ assert not any("Electron installer trust" in step.get("run", "") for step in steps)