gh release download

gh release download [<tag>] [flags]

从 GitHub Release,下载资源。

如果没有显式的 tag 参数,资源将从项目的最新版本下载。在这种情况下,需要--pattern

Options

-A, --archive <format>
下载的格式 (zip or tar.gz)
-D, --dir <string>
下载的位置
-p, --pattern <stringArray>
只下载符合 glob 匹配模式的资源

Options inherited from parent commands

-R, --repo <[HOST/]OWNER/REPO>
使用 [HOST/]OWNER/REPO 格式,选择另一存储库

Examples

# 下载 v1.2.3 的所有资源
$ gh release download v1.2.3

# 仅下载 Debian 包
$ gh release download --pattern '*.deb'

# 下载多文件
$ gh release download -p '*.deb' -p '*.rpm'

# 下载压缩文件
$ gh release download v1.2.3 --archive=zip

See also