fix(release): keep manual desktop releases as drafts

Make workflow_dispatch draft handling explicit and add a post-publish guard that edits the release back to draft when manual draft runs upload assets to an existing release.\n\nTested: bun test scripts/pr/release-workflow.test.ts\nTested: git diff --check\nScope-risk: narrow\nConfidence: high
This commit is contained in:
程序员阿江(Relakkes)
2026-06-17 17:19:27 +08:00
parent 2c1af7a843
commit ad33980c40
2 changed files with 11 additions and 1 deletions
+7 -1
View File
@@ -587,7 +587,7 @@ jobs:
tag_name: v${{ steps.version.outputs.value }}
name: Claude Code Haha v${{ steps.version.outputs.value }}
body: ${{ steps.release_notes.outputs.body }}
draft: ${{ github.event_name == 'workflow_dispatch' && inputs.draft || false }}
draft: ${{ github.event_name == 'workflow_dispatch' && inputs.draft == true }}
prerelease: false
fail_on_unmatched_files: true
files: |
@@ -599,3 +599,9 @@ jobs:
artifacts/release-assets/**/*.blockmap
artifacts/update-metadata-standard/*.yml
desktop/scripts/install-macos-unsigned.sh
- name: Ensure workflow-dispatch release remains draft
if: github.event_name == 'workflow_dispatch' && inputs.draft == true
env:
GH_TOKEN: ${{ github.token }}
run: gh release edit "v${{ steps.version.outputs.value }}" --draft --repo "${{ github.repository }}"