@release.command()
def ghrelease():
    'Create a GitHub release using the `github-release` command-line\n    tool.\n\n    Reads the changelog to upload from `changelog.md`. Uploads the\n    tarball from the `dist` directory.\n    '
    version = get_version(1)
    tag = ('v' + version)
    with open(os.path.join(BASE, 'changelog.md')) as f:
        cl_md = f.read()
    subprocess.check_call(['github-release', 'release', '-u', GITHUB_USER, '-r', GITHUB_REPO, '--tag', tag, '--name', f'{GITHUB_REPO} {version}', '--description', cl_md])
    tarball = os.path.join(BASE, 'dist', f'beets-{version}.tar.gz')
    subprocess.check_call(['github-release', 'upload', '-u', GITHUB_USER, '-r', GITHUB_REPO, '--tag', tag, '--name', os.path.basename(tarball), '--file', tarball])
Create a GitHub release using the `github-release` command-line
tool.

Reads the changelog to upload from `changelog.md`. Uploads the
tarball from the `dist` directory.
@release.command()
def ghrelease():
    'Create a GitHub release using the `github-release` command-line\n    tool.\n\n    Reads the changelog to upload from `changelog.md`. Uploads the\n    tarball from the `dist` directory.\n    '
    version = get_version(1)
    tag = ('v' + version)
    with open(os.path.join(BASE, 'changelog.md')) as f:
        cl_md = f.read()
    subprocess.check_call(['github-release', 'release', '-u', GITHUB_USER, '-r', GITHUB_REPO, '--tag', tag, '--name', f'{GITHUB_REPO} {version}', '--description', cl_md])
    tarball = os.path.join(BASE, 'dist', f'beets-{version}.tar.gz')
    subprocess.check_call(['github-release', 'upload', '-u', GITHUB_USER, '-r', GITHUB_REPO, '--tag', tag, '--name', os.path.basename(tarball), '--file', tarball])