cargo-distribute

Crates.iocargo-distribute
lib.rscargo-distribute
version0.202106.16
sourcesrc
created_at2021-06-04 02:52:17.7209
updated_at2021-06-09 10:03:04.542192
descriptionTemplate generator for continuous distribution of rust projects to homebrew, linuxbrew and scoop
homepagehttps://github.com/fuyutarow/cargo-distribute
repositoryhttps://github.com/fuyutarow/cargo-distribute.git
max_upload_size
id405978
size110,397
fuyutarow (fuyutarow)

documentation

README

cargo-distribute

WIP

Installation

cargo insatll cargo-distribute

Usage

In order to distribute packages using homebrew, two repositories are required.

Step 1. Create a usename/homebrew-tap repository

~$ mkdir ~/homebrew-tap
~$ cd $_
~/homebrew-tap$ git init
~/homebrew-tap$ git push

Step 2. Generate a github toke from this link. https://github.com/settings/tokens

Step 3. Register the value of the token created in Step 2 in the actions sercrets of this link. https://github.com/usename/myproject/settings/secrets/actions

Step 4. Use cargo-ditribute to generate the necessary files

Two files will be generated. - myproject/.github/workflows/release.yml - homebrew-tap/templates/myproject.rb

Do a git commit and push in each of the two repositories. username/myproject and 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

Step 5. Add a tag for username/myproject and push it

This will trigger the distribution.

~$ cd myproject
~/myproject$ git tag vX.Y.Z
~/myproject$ git push --tags
Commit count: 48

cargo fmt