github
github copied to clipboard
creating a draft release
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.
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.
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
withtype = prereleased
:
CI publishes version to new environmenton: release: types: [prereleased]
[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
withtype = released
:
CI promotes this version to productionon: release: types: [released]
Yes I totally agree that it should be possible to enable some flag somewhere to have all releases being drafts
@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.
@CalebAlbers I have not found a solution yet
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.
@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.
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
?
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.
:tada: This issue has been resolved in version 8.1.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
:tada: This issue has been resolved in version 9.0.0-beta.2 :tada:
The release is available on:
Your semantic-release bot :package::rocket: