A template for cargo generate that is the starting point for all of @lancelafontaine's Rust projects on GitHub.
This template was originally forked from rust-github
's template and customized for my projects.
See the rust-github
's website for details on setting up a new project.
- Install or update
cargo-generate
.
cargo install cargo-generate
- Generate a new project from this template. This command will prompt you for a project name, project description, and GitHub username.
cargo generate --git https://github.com/lancelafontaine/rust-template.git
-
Create a new empty GitHub repository and follow the instructions to push the newly-created local repository to Github.
-
Protect the main branch, require a pull request to the repository before merging, and rrequire status checks to pass before merging.
-
Set up your crates.io token in a GitHub secret called
CARGO_API_KEY
.
When you are ready to publish a version of your application (eg. 0.1.0
), run:
git tag -a 0.1.0
git push --follow-tags
This tag should trigger the continuous deployment which will publish your application on crates.io and publish the binaries on GitHub Releases.