Skip to content

m github release

Create a release in Github.

https://docs.github.com/en/rest/reference/repos#create-a-release

example::

$ m github release \
    --owner jmlopez-rod \
    --repo pysync \
    --version 1.0.0

The owner option defaults to the value of the environment variable GITHUB_REPOSITORY_OWNER.

Source code in m/cli/commands/github/release.py
class Arguments(BaseModel):
    r"""Create a release in Github.

    https://docs.github.com/en/rest/reference/repos#create-a-release

    example::

        $ m github release \
            --owner jmlopez-rod \
            --repo pysync \
            --version 1.0.0

    The `owner` option defaults to the value of the environment variable
    `GITHUB_REPOSITORY_OWNER`.
    """

    owner: str = Arg(
        default=env('GITHUB_REPOSITORY_OWNER'),
        help='repo owner',
    )
    repo: str = Arg(
        help='repo name',
        required=True,
    )
    version: str = Arg(
        help='version to release',
        required=True,
    )
    branch: str | None = Arg(
        help='The branch where the git tag will be created',
    )

Required arguments

--repo

repo name

--version

version to release

Options

--owner

  • default: 'jmlopez-rod'

repo owner

--branch

The branch where the git tag will be created