我如何以 "raw" 格式读取 GitHub 中的发布文件

How can i read a release file in GitHub in "raw" format

概念: 我想要一个 PHP API 可以使用 latest.yml 检测 github 上的最新版本号并使用 URL 下载正确的可执行文件 latest.yml 文件.

现在我正在使用 electron builder + updater 来创建我的最新版本和 latest.yml 文件,因此我需要一种方法来获取 yml 文件中的 URL 我知道该怎么做如果文件在一个目录中,但是我需要一种在 GitHub 上读取文件 "raw" 的方法,但是我不确定我是否可以将发布文件作为 https://raw.githubusercontent.com/futurelucas4502/management-console/releases/latest/latest.ymlhttps://raw.githubusercontent.com/futurelucas4502/management-console/releases/download/latest/latest.yml 不起作用

所以我不确定 github 是否能够查看 "raw" 发布文件,但是使用 PHP file_get_contents() 可以按预期工作并加载 "raw"版本文件无需下载。 https://www.php.net/manual/en/function.file-get-contents.php