Skip to content

GitHub publisher creates duplicate drafts with multiple dry runs #4325

Closed

Description

@wwwillchen

Pre-flight checklist

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project uses.
  • I have searched the issue tracker for a bug that matches the one I want to file, without success.

Electron Forge version

7.11.1

Electron version

40.0.0

Operating system

Ubuntu 24.04 (publisher); dry runs generated on Windows, Ubuntu, macOS ARM, and macOS Intel

Last known working Electron Forge version

Unknown

Expected behavior

All restored dry runs for the same version upload their assets to one GitHub release.

Actual behavior

electron-forge publish --from-dry-run created two draft releases for the same tag and split the platform assets between them.

The first dry run created release 357129992. Five seconds later, the second dry run listed releases but did not find the new draft, so it created release 357130015.

Steps to reproduce

  1. Configure @electron-forge/publisher-github with draft: true.
  2. Run electron-forge publish --dry-run on multiple platforms.
  3. Merge the generated out/ directories.
  4. Run electron-forge publish --from-dry-run.

Additional information

Example run:

https://github.com/dyad-sh/dyad/actions/runs/29803541972

Publish job:

https://github.com/dyad-sh/dyad/actions/runs/29803541972/job/88550978005

Activity

  1. claude commented on Jul 21, 2026

    @claude
    Contributor

    Working with Samuel Attard and Erick Zhao

    Confirmed the root cause: publish --from-dry-run runs one publish() call per saved dry run on the same PublisherGithub instance, and each call re-lists releases to find an existing one — but GitHub's "list releases" API is eventually consistent, so it can miss the draft created seconds earlier by the previous dry run and create a second draft for the same tag. The fix caches the release found or created per tag on the publisher instance so subsequent calls reuse it: #4326 (against main) and #4327 (port to next).

  2. added a commit that references this issue on Aug 2, 2026
    45ec09c
  3. added a commit that references this issue on Aug 2, 2026
    155389c
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions