ci(release): publish pre-drafted GitHub Releases atomically with assets #410

Manually merged
github merged 2 commits from github-bot/gh-410 into gh-pr/410/base 2026-12-03 22:37:22 +00:00 AGit
Owner

@⁠Androtim on GitHub · 2026-12-03 21:01 UTC · original
Androtim:ci/atomic-draft-release → main · +12 −0 · 1 files · 2 commits · merged 2026-12-03 21:20 UTC

Summary

Updates the Publish GitHub Release step in .github/workflows/release.yml so pre-drafted releases are published atomically with their release assets attached:

  • Queries gh api repos/$env:GITHUB_REPOSITORY/releases?per_page=30 (which includes draft releases, unlike tag-based endpoints) and checks for an existing draft matching $tag ( ag_name == and draft == true).
  • When a draft release is found:
    1. Uploads arget/release/MiniVI.exe and MiniVI.exe.sha256 with gh release upload ... --clobber.
    2. Publishes the draft atomically via gh release edit --draft=false, so users and MiniVI-Launcher immediately see both the authored release notes and release binaries together.
  • When no draft exists for $tag, preserves the exact existing gh release create fallback.
  • Checks $LASTEXITCODE after each gh command so a failed upload never publishes an incomplete draft.

Verification

  • Verified YAML and PowerShell syntax (yaml.safe_load + System.Management.Automation.Language.Parser::ParseFile — 0 errors).
  • Verified gh api repos/Androtim/MiniVI/releases?per_page=5 | ConvertFrom-Json field names (id, ag_name, draft) and gh release upload / gh release edit CLI flags.
**@⁠Androtim** on GitHub · 2026-12-03 21:01 UTC · [original](https://github.com/Androtim/MiniVI/pull/410) `Androtim:ci/atomic-draft-release` → `main` · +12 −0 · 1 files · 2 commits · merged 2026-12-03 21:20 UTC ## Summary Updates the Publish GitHub Release step in .github/workflows/release.yml so pre-drafted releases are published atomically with their release assets attached: - Queries gh api repos/$env:GITHUB_REPOSITORY/releases?per_page=30 (which includes draft releases, unlike tag-based endpoints) and checks for an existing draft matching $tag ( ag_name == and draft == true). - When a draft release is found: 1. Uploads arget/release/MiniVI.exe and MiniVI.exe.sha256 with gh release upload ... --clobber. 2. Publishes the draft atomically via gh release edit --draft=false, so users and MiniVI-Launcher immediately see both the authored release notes and release binaries together. - When no draft exists for $tag, preserves the exact existing gh release create fallback. - Checks $LASTEXITCODE after each gh command so a failed upload never publishes an incomplete draft. ## Verification - Verified YAML and PowerShell syntax (yaml.safe_load + System.Management.Automation.Language.Parser::ParseFile — 0 errors). - Verified gh api repos/Androtim/MiniVI/releases?per_page=5 | ConvertFrom-Json field names (id, ag_name, draft) and gh release upload / gh release edit CLI flags.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 21:08:58 +00:00
github-bot changed target branch from main to gh-pr/410/base 2026-12-03 21:24:34 +00:00
github manually merged commit 3c1f503517 into gh-pr/410/base 2026-12-03 22:37:22 +00:00
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Androtim--MiniVI!410
No description provided.