5 个版本
0.202106.16 | 2021 年 6 月 9 日 |
---|---|
0.202106.15 | 2021 年 6 月 4 日 |
0.202106.14 | 2021 年 6 月 4 日 |
0.202106.12 | 2021 年 6 月 4 日 |
0.202106.0 | 2021 年 6 月 4 日 |
438 在 Cargo 插件
75KB
289 行
cargo-distribute
进行中
安装
cargo insatll cargo-distribute
使用方法
为了使用 homebrew 分发软件包,需要两个仓库。
username/myproject
,https://github.com/usename/myproject- 这是包含您想要分发的软件包的仓库。
username/homebrew-tap
,https://github.com/usename/homebrew-tap- 这是您需要使用 homebrew 分发的 tap 仓库
步骤 1. 创建一个 usename/homebrew-tap
仓库
~$ mkdir ~/homebrew-tap
~$ cd $_
~/homebrew-tap$ git init
~/homebrew-tap$ git push
步骤 2. 从此链接生成 GitHub token。 https://github.com/settings/tokens
步骤 3. 在此链接的 actions secrets 中注册步骤 2 中创建的 token 的值。 https://github.com/usename/myproject/settings/secrets/actions
步骤 4. 使用 cargo-ditribute 生成必要的文件
将生成两个文件。 - myproject/.github/workflows/release.yml
- homebrew-tap/templates/myproject.rb
在每个仓库中进行 git commit 和 push。 username/myproject
和 username/homebrew-tap
~$ cd ~/myproject
~/myproject$ echo ./Cargo.toml
~/myproject$ cargo distribute --tap ~/homebrew-tap
~/myproject$ git -A && git commit -m "commit"
~/myproject$ git push
~$ cd ~/homebrew-tap
~/homebrew-tap$ git -A && git commit -m "commit"
~/homebrew-tap$ git push
步骤 5. 为 username/myproject
添加标签并推送
这将触发分发。
~$ cd myproject
~/myproject$ git tag vX.Y.Z
~/myproject$ git push --tags
依赖项
~9–22MB
~248K SLoC