From b6d4497f2317764710b636807a6af533950da953 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 15 Sep 2026 11:18:30 +0000 Subject: [PATCH] ci: proxy create-release-draft via repository_dispatch Co-authored-by: michael berry --- .github/workflows/dispatch-packaging.yml | 30 +++++++++++++++++-- changes/cursor-dispatch-release-draft-695b.md | 4 +++ 2 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 changes/cursor-dispatch-release-draft-695b.md diff --git a/.github/workflows/dispatch-packaging.yml b/.github/workflows/dispatch-packaging.yml index 76f19a977..92fb35f0b 100644 --- a/.github/workflows/dispatch-packaging.yml +++ b/.github/workflows/dispatch-packaging.yml @@ -2,16 +2,17 @@ name: Dispatch_Packaging on: repository_dispatch: - types: [package-release] + types: [package-release, create-release-draft] # Proxy for agents or automation that can send repository_dispatch but not -# workflow_dispatch. Dispatches the exact-SHA packaging workflows unchanged. +# workflow_dispatch. Dispatches exact-SHA packaging and release-draft workflows. permissions: contents: read actions: write jobs: - dispatch: + dispatch-package: + if: github.event.action == 'package-release' runs-on: ubuntu-latest steps: - name: Validate source SHA @@ -32,3 +33,26 @@ jobs: -f "source_sha=${SOURCE_SHA}" gh workflow run WindowsInstall.yml --repo studio-berry/loop --ref stable \ -f "source_sha=${SOURCE_SHA}" + + dispatch-release-draft: + if: github.event.action == 'create-release-draft' + runs-on: ubuntu-latest + steps: + - name: Validate source SHA + env: + SOURCE_SHA: ${{ github.event.client_payload.source_sha }} + run: | + if ! [[ "$SOURCE_SHA" =~ ^[0-9a-fA-F]{40}$ ]]; then + echo "::error::client_payload.source_sha must be a full 40-character Git SHA" + exit 1 + fi + + - name: Dispatch CreateReleaseDraft workflow + env: + GH_TOKEN: ${{ github.token }} + SOURCE_SHA: ${{ github.event.client_payload.source_sha }} + ALLOW_EXISTING: ${{ github.event.client_payload.allow_existing_release || 'false' }} + run: | + gh workflow run CreateReleaseDraft.yml --repo studio-berry/loop --ref stable \ + -f "source_sha=${SOURCE_SHA}" \ + -f "allow_existing_release=${ALLOW_EXISTING}" diff --git a/changes/cursor-dispatch-release-draft-695b.md b/changes/cursor-dispatch-release-draft-695b.md new file mode 100644 index 000000000..4c5796f16 --- /dev/null +++ b/changes/cursor-dispatch-release-draft-695b.md @@ -0,0 +1,4 @@ +Category: internal +Audience: contributors +Breaking-Change: no +Summary: Extend the repository_dispatch packaging proxy to dispatch CreateReleaseDraft after paired Linux and Windows package workflows succeed.