VoiceStudio is the open-source, fully-local ElevenLabs alternative — voice cloning, voice design, video dubbing, dictation, transcription & audiobook creation in 646 languages.
Python aiaudiobookcudadubbingelevenlabs-alternativehuggingfacelocal-firstmlxomnivoice-studiospeech-to-texttext-to-speechtranscriptiontranslatettsvoice-aivoice-cloningvoice-generationvoicestudioworkflow
ci(release): let the owner delegate unsigned publishes through UNSIGNED_RELEASE_PUBLISHERS
velixio736059f06dba
diff --git a/.github/workflows/electron-release.yml b/.github/workflows/electron-release.ymlindex b125a925e..6444e6077 100644--- a/.github/workflows/electron-release.yml+++ b/.github/workflows/electron-release.yml@@ -52,10 +52,21 @@ jobs:DISPATCH_ACTOR: ${{ github.actor }}RERUN_ACTOR: ${{ github.triggering_actor }}OWNER: ${{ github.repository_owner }}+ # Comma-separated logins the owner trusts with unsigned publishes. Only repo+ # admins can edit Actions variables, so the owner stays in control of it.+ UNSIGNED_PUBLISHERS: ${{ vars.UNSIGNED_RELEASE_PUBLISHERS }}run: |+ may_publish_unsigned() {+ [ -n "$1" ] || return 1+ [ "$1" = "$OWNER" ] && return 0+ case ",$(printf '%s' "$UNSIGNED_PUBLISHERS" | tr -d '[:space:]')," in+ *",$1,"*) return 0 ;;+ esac+ return 1+ }if [ "$ALLOW_UNSIGNED" = true ]; then- test "$DISPATCH_ACTOR" = "$OWNER" && test "$RERUN_ACTOR" = "$OWNER" || {- echo "Only the repository owner may accept unsigned installers"; exit 1;+ may_publish_unsigned "$DISPATCH_ACTOR" && may_publish_unsigned "$RERUN_ACTOR" || {+ echo "Only the repository owner or an account in UNSIGNED_RELEASE_PUBLISHERS may accept unsigned installers"; exit 1;}fiif [ -n "$RELEASE_TAG_OVERRIDE" ]; thendiff --git a/docs/RELEASING.md b/docs/RELEASING.mdindex 2168d734d..23296b353 100644--- a/docs/RELEASING.md+++ b/docs/RELEASING.md@@ -148,6 +148,10 @@ Dispatch `electron-release.yml` for the exact tag with `publish=true`. Signingand notarization are required by default. The owner may explicitly set`allow_unsigned=true`; the workflow then adds the installer-trust disclosure tothe release notes. Never select that exception without the owner's decision.+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+unsigned publish. Remove a login to revoke it; an empty variable means owner only.Publishing the GitHub Release triggers the Docker workflow for that tag. Dockerrelease tags are never built from a tag push, and `:latest` only ever tracksdiff --git a/tests/test_electron_transition.py b/tests/test_electron_transition.pyindex 4324bedd9..4e537dc96 100644--- a/tests/test_electron_transition.py+++ b/tests/test_electron_transition.py@@ -238,7 +238,9 @@ def test_electron_release_scopes_signing_secrets_and_gates_unsigned_owner_dispatassert [step["name"] for step in scoped] == ["Package without publishing"]assert credentials.issubset(scoped[0]["env"])guard = next(step for step in jobs["validate"]["steps"] if step.get("name") == "Require an exact version tag")- assert 'test "$DISPATCH_ACTOR" = "$OWNER" && test "$RERUN_ACTOR" = "$OWNER"' in guard["run"]+ # Who may publish unsigned is exercised in test_unsigned_publish_needs_owner_or_listed_publisher.+ assert 'may_publish_unsigned "$DISPATCH_ACTOR" && may_publish_unsigned "$RERUN_ACTOR"' in guard["run"]+ assert guard["env"]["OWNER"] == "${{ github.repository_owner }}"assert guard["env"]["DISPATCH_ACTOR"] == "${{ github.actor }}"assert guard["env"]["RERUN_ACTOR"] == "${{ github.triggering_actor }}"publish = jobs["release"]["steps"][-1]@@ -295,3 +297,31 @@ def test_release_tag_override_preserves_exact_tag_checkout(tmp_path, workflow_reTEST_HEAD='tagged' if head_matches else 'different')result = subprocess.run(['bash', '-e', '-c', guard['run']], env=env, capture_output=True)assert (result.returncode == 0) == ok, result.stderr++[email protected]('publishers,dispatcher,rerunner,ok', [+ ('', 'owner', 'owner', True),+ ('', 'maintainer', 'maintainer', False),+ ('maintainer', 'maintainer', 'maintainer', True),+ (' other , maintainer ', 'maintainer', 'maintainer', True),+ ('maintainer', 'maintainer', 'stranger', False),+ ('maintainer', 'stranger', 'maintainer', False),+ ('maint', 'maintainer', 'maintainer', False),+ ('maintainer,', '', '', False),+])+def test_unsigned_publish_needs_owner_or_listed_publisher(tmp_path, publishers, dispatcher, rerunner, ok):+ import os+ import subprocess+ import yaml+ workflow = yaml.load((ROOT / '.github/workflows/electron-release.yml').read_text(), Loader=yaml.BaseLoader)+ for name, body in [('node', 'echo 1.2.3'), ('git', 'echo tagged')]:+ executable = tmp_path / name+ executable.write_text('#!/bin/sh\n' + body + '\n')+ executable.chmod(0o755)+ guard = next(s for s in workflow['jobs']['validate']['steps'] if 'run' in s)+ assert guard['env']['UNSIGNED_PUBLISHERS'] == '${{ vars.UNSIGNED_RELEASE_PUBLISHERS }}'+ env = dict(os.environ, PATH=str(tmp_path) + os.pathsep + os.environ['PATH'], REF='refs/tags/v1.2.3',+ WORKFLOW_REF='refs/tags/v1.2.3', RELEASE_TAG_OVERRIDE='', ALLOW_UNSIGNED='true',+ OWNER='owner', UNSIGNED_PUBLISHERS=publishers, DISPATCH_ACTOR=dispatcher, RERUN_ACTOR=rerunner)+ result = subprocess.run(['bash', '-e', '-c', guard['run']], env=env, capture_output=True)+ assert (result.returncode == 0) == ok, result.stderr