electron-builder: Error: Release must be a draft

Hey there,

I’m testing out deployments for my application. The first deployment works, but subsequent deployments all fail with Error: Release must be a draft.

For both of these builds, all I did was push a tag. I am not creating any release drafts myself, I am letting electron-builder take care of that. This process works for the first build, but fails after that. If I delete all existing releases, it works again for a single build.

Thanks!

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 17 (9 by maintainers)

Commits related to this issue

Most upvoted comments

Btw, once I have everything working, I’d like to contribute to the docs and help clarify the places where I had problems. I’ll open another issue to discuss the changes I plan to make before I open a PR.

I’ve discovered the problem. I wasn’t updating the version field of my app/package.json. I was only updating the main package.json. This resulted in my CI logs printing 1.0.1, but the artifacts were built as 1.0.0 and being deployed to that release. This also explains the Error: Release must be a draft I was getting; it was attempting to upload artifacts to my already-published v1.0.0 release, rather than drafting a new release for the v1.0.1 tag. This seems like an easy mistake to make, so perhaps electron-builder should throw an error in this case.

Also, the tag name did indeed need to be prefixed with v. This was the configuration that worked once I fixed my app/package.json:

  • Tag version: v1.0.1
  • Release title: v1.0.1