proj_flow.ext.github.cli

The proj_flow.ext.github.cli adds the github command, replacing the old ci code. Additionally, it provides github matrix and github release commands. It will soon also have github publish, finishing the job started in release.

proj_flow.ext.github.cli.github()

Interact with GitHub workflows and releases

Call:

proj-flow github

Call:

./flow github

proj_flow.ext.github.cli.matrix(pretty: ~typing.Annotated[bool, ~proj_flow.api.arg.FlagArgument(help=Indent JSON document, pos=False, names=[], nargs=None, opt=True, meta=None, action=store_true, default=False, choices=None, completer=None, group=None)], official: ~typing.Annotated[bool, ~proj_flow.api.arg.FlagArgument(help=Cut matrix to release builds only, pos=False, names=[], nargs=None, opt=True, meta=None, action=store_true, default=False, choices=None, completer=None, group=None)], rt: ~proj_flow.api.env.Runtime)

Supply data for GitHub Actions

Call:

proj-flow github matrix

Call:

./flow github matrix

Parameters:
  • pretty (bool) – Indent JSON document

  • official (bool) – Cut matrix to release builds only

  • rt (Runtime) – Tools and print messages, while respecting --dry-run, --silent and --verbose.

proj_flow.ext.github.cli.release_cmd(rt: ~proj_flow.api.env.Runtime, all: ~typing.Annotated[bool, ~proj_flow.api.arg.FlagArgument(help=Take all Conventional Commits., pos=False, names=[], nargs=None, opt=True, meta=None, action=store_true, default=False, choices=None, completer=None, group=None)], force: ~typing.Annotated[str | None, ~proj_flow.api.arg.Argument(help=Ignore the version change from changelog and instead use this value. Allowed values are: patch, fix, minor, feat, feature, major, breaking and release., pos=False, names=[], nargs=None, opt=None, meta=level, action=None, default=None, choices=['patch', 'fix', 'minor', 'feat', 'feature', 'major', 'breaking', 'release'], completer=None, group=None)], publish: ~typing.Annotated[str | None, ~proj_flow.api.arg.Argument(help=Publish the release during this command., pos=False, names=[], nargs=None, opt=None, meta=None, action=None, default=None, choices=['ON', 'OFF'], completer=None, group=None)], changelog: ~typing.Annotated[bool, ~proj_flow.api.arg.FlagArgument(help=Even with --dry-run, write changes in project files, changelog, etc., pos=False, names=[], nargs=None, opt=True, meta=None, action=store_true, default=False, choices=None, completer=None, group=None)], omit: ~typing.Annotated[list[str] | None, ~proj_flow.api.arg.Argument(help=Hide these commits in the generated changelog, pos=False, names=[], nargs=None, opt=None, meta=range, action=append, default=~proj_flow.ext.github.cli.<lambda>, choices=None, completer=None, group=None)])

Bump the project version based on current git logs, create a “chore” commit for the change, attach an annotated tag with the version number and push it all to GitHub.

Call:

proj-flow github release

Call:

./flow github release

Parameters:
  • rt (Runtime) – Tools and print messages, while respecting --dry-run, --silent and --verbose.

  • all (bool) – Take all Conventional Commits.

  • force (str | None) – Ignore the version change from changelog and instead use this value. Allowed values are: patch, fix, minor, feat, feature, major, breaking and release.

  • publish (str | None) – Publish the release during this command.

  • changelog (bool) – Even with –dry-run, write changes in project files, changelog, etc.

  • omit (list[str] | None) – Hide these commits in the generated changelog

proj_flow.ext.github.cli.publish(rt: ~proj_flow.api.env.Runtime, ref: ~typing.Annotated[str | None, ~proj_flow.api.arg.Argument(help=Publish this release draft. In case this is called from within GitHub Actions and your release is named exactly like the tag used to trigger this flow, you can use ${{github.action_ref}} variable. Defaults to current tag., pos=False, names=[], nargs=None, opt=None, meta=release, action=None, default=None, choices=None, completer=None, group=None)], upload: ~typing.Annotated[str | None, ~proj_flow.api.arg.Argument(help=If present, upload files from the directory to the referenced release before publishing., pos=False, names=[], nargs=None, opt=None, meta=directory, action=None, default=None, choices=None, completer=None, group=None)])

Upload package artifacts to a GitHub release and in case the release is still in draft, publish it.

Call:

proj-flow github publish

Call:

./flow github publish

Parameters:
  • rt (Runtime) – Tools and print messages, while respecting --dry-run, --silent and --verbose.

  • ref (str | None) – Publish this release draft. In case this is called from within GitHub Actions and your release is named exactly like the tag used to trigger this flow, you can use ${{github.action_ref}} variable. Defaults to current tag.

  • upload (str | None) – If present, upload files from the directory to the referenced release before publishing.