githubbinaryupload是一个实用程序,用于从GitHub上带有附加文件的标记发布版本。
github-binary-upload的Python项目详细描述
GitHub二进制上载
简介
github-binary-upload
是一个脚本,用于从带有附加资产的Git标记创建GitHub版本。在
安装
- 来自PyPI:
python3 -m pip install github-binary-upload
在 - 适用于glibc>;=2.17(任何最新的Linux发行版)和macOS High Sierra的Linux x86_64的自包含可执行文件 和更新版本可在releases page上使用。在
- 适用于Arch Linux用户的AUR软件包: python-github-binary-upload
使用
安装后,您可以运行github-binary-upload
:
示例
跑
github-binary-upload -u ExampleUser -l ExampleUser/ExampleProject MyFirstAsset.zip MySecondAsset.whl
从GitHub项目中的最新标记创建版本ExampleUser/ExampleProject
。文件MyFirstAsset.zip
并且MySecondAsset.whl
将作为可下载文件附加。在
可以对同一标记多次调用github-binary-upload
。每次都将重新创建发布。这是
对于可以多次运行的CI管道特别有用。在
Python API
github-binary-upload
定义了一个可以从Python代码调用的函数publish_release_from_tag
:
fromgithub_binary_uploadimportpublish_release_from_tagpublish_release_from_tag(project,tag,assets,github_server,username,password,dry_run)
如果tag
是{dry_run
是一个可选参数,它
默认为False
。在
- 项目
标签: