def METHOD_NAME(tag: Optional[str] = None, dry_run: bool = True, cwd: Optional[str] = None):
    github_token = os.getenv("GITHUB_TOKEN")
    github_username = os.getenv("GITHUB_USERNAME")
    if github_token and github_username:
        if tag:
            check_output(
                [
                    "git",
                    "push",
                    "https://{github_username}:{github_token}@github.com/dagster-io/dagster.git"
                    .format(github_username=github_username, github_token=github_token),
                    tag,
                ],
                dry_run=dry_run,
                cwd=cwd,
            )
        check_output(
            [
                "git",
                "push",
                "https://{github_username}:{github_token}@github.com/dagster-io/dagster.git".format(
                    github_username=github_username, github_token=github_token
                ),
            ],
            dry_run=dry_run,
            cwd=cwd,
        )
    else:
        if tag:
            check_output(["git", "push", "origin", tag], dry_run=dry_run, cwd=cwd)
        check_output(["git", "push"], dry_run=dry_run, cwd=cwd)