@release.command()
def ghrelease():
 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', '{} {}'.format(GITHUB_REPO, version), '--description', cl_md])
 tarball = os.path.join(BASE, 'dist', 'beets-{}.tar.gz'.format(version))
 subprocess.check_call(['github-release', 'upload', '-u', GITHUB_USER, '-r', GITHUB_REPO, '--tag', tag, '--name', os.path.basename(tarball), '--file', tarball])

@ release . command ( ) def ghrelease ( ) : 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' , '{} {}' . format ( GITHUB_REPO , version ) , '--description' , cl_md ] ) tarball = os . path . join ( BASE , 'dist' , 'beets-{}.tar.gz' . format ( version ) ) 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 .