Skip to content

fix: publish releases after uploading assets #216

Closed

Description

@uniqueg

The release workflow (.github/workflows/release.yaml, step "Create release") is not safe with immutable releases, which this repository uses.

For v0.3.0, the release was published by hand and the failed job was re-run. The step found the existing release and took its "release exists" path (gh release upload "${TAG}" dist/* --clobber, then gh release edit). That failed with HTTP 422: Cannot upload assets to an immutable release: once an immutable release is published, its assets can't be added, replaced or deleted.

The normal path (gh release create "${TAG}" dist/* ...) works, because gh creates the release as a draft, uploads the assets and publishes it last. But the workflow relies on that implicitly, and it has no way to finish a release whose run stopped partway (a leftover draft) or that was published early.

Expected:

  • Create the release explicitly as a draft, upload the assets, set the notes, and publish it (gh release edit --draft=false, with the pre-release and latest flags) as the last action.
  • On re-runs, finish an existing draft (uploads to drafts are allowed).
  • On re-runs with a published release, upload nothing. Check that all expected assets are already there (by name, and compare digests where possible). Edit only what stays editable (notes, title, pre-release and latest flags). If assets are missing, fail with a clear error that explains the manual steps.
  • The previous-release lookup (gh release list --exclude-drafts) keeps ignoring drafts.

Activity

  1. added
    priority: high
    status: in progress
    type: bug
    workload: hours
    on Oct 24, 2026
  2. removed
    status: in progress
    on Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: hightype: bugworkload: hours

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions