Skip to content

Add support for draft Github releases #1193

Open
@rantoniuk

Description

@rantoniuk

Feature Request

Description

GH supports draft releases (on the contrary to pre-releases) but I don't see any draft reference on GHA docs.

Currently I have the following GH workflow:

      - name: Calculate version
        uses: python-semantic-release/python-semantic-release@v9.9.0
        id: semantic-release
        with:
          root_options: "-c .semantic-release.toml"
          github_token: ${{ steps.ghactions-auth.outputs.token }}
          push: "false"
          changelog: "false"
          vcs_release: "false"

      - name: Create GH release 
        uses: ncipollo/release-action@v1
        with:
          token: ${{ steps.ghactions-auth.outputs.token }}
          tag: ${{ steps.semantic-release.outputs.tag }}
          removeArtifacts: true
          generateReleaseNotes: true
          draft: true
          allowUpdates: true
          updateOnlyUnreleased: true

The above workflow runs only on feature (non-main) branches, determines the version and creates a draft GH release. If the release exists already, it is updated (i.e. the release notes are re-generated).

I'd like to move fully to python-semantic-release because it generates better decorated GH Release Notes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmedPrevent from becoming stalefeatureA new feature or a feature requesthelp-wantedExtra attention is required

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions