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.

fix(release): keep printed platform names apart from the credential-name table

velixioa173ae642654
diff --git a/scripts/release.py b/scripts/release.py
index acdbcd56f..130f4d442 100644
--- a/scripts/release.py
+++ b/scripts/release.py
@@ -35,8 +35,13 @@ GUARD_TESTS = [
RELEASE_FILES = [
"package.json", "pyproject.toml", "backend/core/version.py", "uv.lock", "CHANGELOG.md",
]
-# Repo secrets electron-release.yml needs to sign each platform's installers.
-SIGNING_SECRETS = {
+# Platforms whose installers are signed. Kept apart from the table below so that
+# what the helper prints is plain platform names, never anything derived from the
+# credential-name table (a static analyser treats that table as sensitive).
+PLATFORMS = ("macOS", "Windows")
+# Repo variable names electron-release.yml reads to sign each platform's
+# installers. Only names are listed and checked here, never values.
+SIGNING_ENV_NAMES = {
"macOS": (
"ELECTRON_MACOS_CSC_LINK", "ELECTRON_MACOS_CSC_KEY_PASSWORD",
"APPLE_ID", "APPLE_APP_SPECIFIC_PASSWORD", "APPLE_TEAM_ID",
@@ -236,11 +241,11 @@ def unsigned_platforms() -> tuple[list[str], bool]:
cwd=ROOT, capture_output=True, text=True,
)
if result.returncode:
- return list(SIGNING_SECRETS), True
+ return list(PLATFORMS), True
present = set(result.stdout.split())
missing = [
- platform for platform, names in SIGNING_SECRETS.items()
- if not all(name in present for name in names)
+ platform for platform in PLATFORMS
+ if not all(name in present for name in SIGNING_ENV_NAMES[platform])
]
return missing, False
@@ -255,7 +260,7 @@ def ask_allow_unsigned() -> list[str]:
if not gaps:
print("Signing: macOS and Windows secrets are configured.")
return []
- for platform in SIGNING_SECRETS:
+ for platform in PLATFORMS:
state = (
"? could not read repo secrets" if guessed
else "NO signing secrets (installers ship unsigned)" if platform in gaps
diff --git a/tests/test_release_script.py b/tests/test_release_script.py
index 3a74389ce..94a0a1ffe 100644
--- a/tests/test_release_script.py
+++ b/tests/test_release_script.py
@@ -312,8 +312,9 @@ def test_draft_never_asks_about_signing(release, monkeypatch):
assert not any(c[0] == "dispatch" for c in calls)
-def test_secret_names_match_what_the_release_workflow_reads(release):
+def test_signing_names_match_what_the_release_workflow_reads(release):
+ assert set(release.PLATFORMS) == set(release.SIGNING_ENV_NAMES)
workflow = (ROOT / ".github/workflows/electron-release.yml").read_text(encoding="utf-8")
- for names in release.SIGNING_SECRETS.values():
+ for names in release.SIGNING_ENV_NAMES.values():
for name in names:
assert f"secrets.{name}" in workflow, f"{name} is not used by electron-release.yml"