Skip to content

creating a draft release #275

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ahmadnassri opened this issue Jun 22, 2020 · 11 comments · Fixed by #379
Closed

creating a draft release #275

ahmadnassri opened this issue Jun 22, 2020 · 11 comments · Fixed by #379

Comments

@ahmadnassri
Copy link

ahmadnassri commented Jun 22, 2020

is it possible to create a draft only release?

that is, run the whole process, but keep the release labelled as "draft" in github (otherwise referred to as "pre-release" in GitHub's UI and not to be confused with semantic-release's prerelease flag on branches)

I looked through issues and examples in this repo and there was no such example, the only reference to "draft" was in-line and doesn't seem to be specifically flaggable ...

to further distinguish from workflow with prerelease flag, I intend to continue using a single main branch and not looking to implement the workflows as described rather, just make the final github release flagged as "draft" upon publishing.

@travi
Copy link
Member

travi commented Jun 23, 2020

To clarify further, are you interested in specifically avoiding additional configuration, or are there details of semantic-release's implementation of prereleases that don't match your goal? Keep in mind that the default configuration enables prereleases for alpha and beta with no extra configuration beyond using those branches.

@ahmadnassri
Copy link
Author

ahmadnassri commented Jun 23, 2020

to state in another lens: while semantic-release can and should be opinionated on the semantic versioning workflow, I believe additional choices on how the "release" (in GitHub's terminology, and GH entity named "release") should be left to the user ...

e.g. draft=true and/or prerelease=true on the Release Entity ...

expectation is be able to use semantic-release with GitHub releases and still tag every tag in GitHub as prerelease / draft if I choose to, regardless of the versioning schema exposes for numbering (-rc, -beta, or none at all)

the real-world-use-case I'm attempting to enable at the moment:

  • one main branch, locked
  • PRs for changes into main branch
  • merged PRs will create a "GitHub Release", flagged as "prerelease=true"
  • CI (GitHub Actions) triggers on release.created with type = prereleased:
    on:
      release:
        types: [prereleased]
    CI publishes version to new environment [version].domain.tld
  • human process follows, QA, etc ... when ready, human can change the state of the GitHub Release to uncheck the prerelease flag
  • CI triggers on n release.created with type = released:
    on:
      release:
        types: [released]
    CI promotes this version to production

@KarstenSiemer
Copy link

KarstenSiemer commented Dec 22, 2020

Yes I totally agree that it should be possible to enable some flag somewhere to have all releases being drafts

@CalebAlbers
Copy link

CalebAlbers commented May 12, 2021

@ahmadnassri have you found any decent workaround for this? We'd like to use exactly the same workflow as what you described with draft releases but haven't found a great way to handle it.

If not, I'll try to find the time to make a PR for this project.

@ahmadnassri
Copy link
Author

ahmadnassri commented May 13, 2021

@CalebAlbers I have not found a solution yet

@davidjoy
Copy link

davidjoy commented May 14, 2021

I have the opposite problem, but have found no documentation on the web about it except this thread, so here I am. Our .releaserc file is only creating Draft releases in Github, and I have to go in and manually publish each one as they're created.

https://github.com/edx/frontend-platform/blob/master/.releaserc

Blows my mind, I can't figure out why it won't publish them. The releases publish to npm just fine, and are available to be installed... Github just won't mark them as Published.

@CalebAlbers
Copy link

CalebAlbers commented May 14, 2021

@davidjoy the current semver github plugin puts releases into the draft state while uploading assets. It looks like the releases for the repo you listed have quite a few assets being published (each individual file, rather than a .zip or similar), so I'm wondering if you are hitting the limit of files that can be attached to the release in Github.

This is pure conjecture, but that's the only thing I can think of. The release doesn't get marked as Published until all the assets are uploaded, so a breakdown there could be causing the issue.

@skn-bot
Copy link

skn-bot commented May 17, 2021

I was also looking for this option in order to first publish a release candidate (aka draft aka prerelease) that is concluded after the actual prod deployment is done.

This should be quite trivial to introduce, right? How about adding a draft option that defaults to false?

@BetaHuhn
Copy link
Contributor

BetaHuhn commented Jun 6, 2021

I am trying to integrate semantic-release with electron-builder and was also looking for this option. My goal is to have semantic-release create a draft release and then electron-builder will upload the artifacts to that release. Once everything is done the release will be published.

This seems like a simple thing to add as most of the code is already there. I would be willing to create a PR for this which implements a draft option like @skn-bot mentioned.

@github-actions
Copy link

🎉 This issue has been resolved in version 8.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link

🎉 This issue has been resolved in version 9.0.0-beta.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants