Skip to content

fix(release): draft→publish pipeline to fix immutable release asset upload#223

Merged
tarotene merged 2 commits into
mainfrom
fix/release-pipeline-draft-publish
Jun 1, 2026
Merged

fix(release): draft→publish pipeline to fix immutable release asset upload#223
tarotene merged 2 commits into
mainfrom
fix/release-pipeline-draft-publish

Conversation

@tarotene

@tarotene tarotene commented May 31, 2026

Copy link
Copy Markdown
Owner

Summary

  • Root cause: release-binaries.yml uploaded assets via gh release upload after publication. With immutable releases enabled, this always fails with HTTP 422.
  • Fix: release-plz now creates a draft release (git_release_draft = true); release-binaries.yml attaches 4 prebuilt binaries to the draft, then publishes it via gh release edit --draft=false. Immutable lock applies only after all assets are attached.
  • Also fixed: changelog template bug (broken ## [x]([x](url)) headers), CHANGELOG.md v0.2.1/v0.2.2 content reconstructed from correct git log ranges, v0.2.0 "5 platforms" → "4 platforms", AGENTS.md and docs/releasing.md updated.

Changes

File Change
release-plz.toml Add git_release_draft = true to telepath-wire; fix changelog header template
.github/workflows/release-binaries.yml Convert to workflow_call + workflow_dispatch(tag); remove release: published; add publish job
.github/workflows/release-plz.yml Add tag output to release-plz-release; add release-binaries job via workflow_call
CHANGELOG.md Fix broken headers; reconstruct v0.2.1/v0.2.2 from correct ranges; fix "5 platforms"
AGENTS.md Document step 6 (draft→publish), update CI workflow table trigger
docs/releasing.md Add draft→publish section, recovery procedure, backfill instructions

Test plan

  • All unit tests pass (cargo test --workspace)
  • cargo clippy --workspace -- -D warnings clean
  • cargo fmt --all -- --check clean
  • Next real release (vX.Y.Z): verify gh release view vX.Y.Z --json assets shows 4 assets and --json isImmutable shows true
  • Dry-run: gh workflow run release-binaries.yml --ref main (no tag) → 4 artifacts as workflow artifacts, no release touched

Post-merge backfill (tracked in #222)

  • v0.1.0: gh workflow run release-binaries.yml -f tag=v0.1.0 + fix release notes
  • v0.2.0: fix "5 platforms" → "4 platforms" in release notes
  • v0.2.1, v0.2.2: fix release notes + add immutable disclaimer (assets cannot be added)

Closes #222

🤖 Generated with Claude Code

…pload (#222)

release-plz.toml: add git_release_draft = true to telepath-wire so GitHub
Releases are created as drafts.  Fixes the structural incompatibility with
immutable releases where `gh release upload` after publish returned HTTP 422.

release-binaries.yml: convert from `release: published` trigger to
`workflow_call` + `workflow_dispatch` with optional `tag` input.  New
`publish` job calls `gh release edit --draft=false` after all four builds
succeed, publishing the draft with assets already attached.

release-plz.yml: add `tag` output to `release-plz-release` (extracted from
release-plz JSON output) and new `release-binaries` job that calls
`release-binaries.yml` via workflow_call immediately after release-plz creates
the draft.

CHANGELOG.md: fix broken headers (## [x]([`x`](url)) → ## [x](url)),
reconstruct v0.2.1 and v0.2.2 entries from correct git log ranges, fix
v0.2.0 "5 platforms" → "4 platforms".

AGENTS.md, docs/releasing.md: document draft→publish flow and recovery.

Closes #222

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 31, 2026 14:32
@tarotene tarotene added bug Something isn't working release Release engineering & versioning ci CI/CD configuration labels May 31, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the release flow so release-plz creates draft GitHub Releases, the binary workflow attaches assets before publication, and the release is then published to avoid immutable-release upload failures.

Changes:

  • Configures release-plz to create draft releases and updates changelog header generation.
  • Converts binary release publishing to a reusable/manual workflow with a final publish job.
  • Updates release docs, AGENTS guidance, and reconstructed changelog entries.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
release-plz.toml Enables draft releases and updates changelog template formatting.
.github/workflows/release-binaries.yml Builds/uploads release binaries through workflow_call/manual dispatch and publishes after uploads.
.github/workflows/release-plz.yml Extracts the release tag and invokes the binary release workflow after release-plz.
CHANGELOG.md Fixes malformed release headers and adjusts recent release notes.
AGENTS.md Documents the new draft-to-publish release flow and workflow triggers.
docs/releasing.md Adds operational guidance for draft publishing, retries, and backfills.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread release-plz.toml Outdated
Comment thread CHANGELOG.md Outdated
Comment thread CHANGELOG.md Outdated
Comment thread CHANGELOG.md Outdated
…existing entries

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@tarotene tarotene merged commit b0b3291 into main Jun 1, 2026
5 checks passed
@tarotene tarotene deleted the fix/release-pipeline-draft-publish branch June 1, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ci CI/CD configuration release Release engineering & versioning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(release): release assets and notes inconsistent; pipeline incompatible with immutable releases

2 participants