Skip to content

Support creation of draft release and draft PRs #246

@NathanReb

Description

@NathanReb

The current workflow implies the creation of a Github release before being able to open a PR to opam-repo and therefore before being able to get feedback from its CI.
This means that whenever there's an issue with the release that's uncovered by opam-repo's CI, users have to delete the github release and start all over again.

The main issue here is that for popular tools, some distribution maintainers susbscribe to github releases in order to be notified when a new version comes out so they can package it for their distribution. Deleting releases can then cause trouble.

The prefered solution to this would be to have a way to trigger opam-repo CI builds in order to test a release, ie to test a distribution tarball and its associated opam files but this will require some work on ocaml-ci and will take some time before getting widely adopted.

In the meantime, it should be fairly easy to add a feature to dune-release allowing the creation of a draft release that we would only undraft once opam-repo's CI goes green and we're sure we can proceed with the actual release.

I suggest the following:

  1. Add a --draft option to dune-release publish so that the release is created as a draft.
  2. Add a --draft option to dune-release opam submit so that the PR is opened as a draft.
  3. Add a dune-release undraft (or any better suited name) command that would undraft the GH release, update the opam-repo PR and undraft it.

Note that 2 and 3 are required because the distrib tarball link will change as we undraft the GH release, meaning we don't want the PR to be merged accidentally untill we have updated the opam file's url.src field.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions