Merge in the Release-Plz Setup #6

Merged
melfely merged 19 commits from melfely/release-plz into master 2026-09-11 16:48:00 +00:00
Showing only changes of commit 72575b2d24 - Show all commits
+56 -2
View File
@@ -1,3 +1,57 @@
# rust_workflow_template
# Rust Workspace Template with Pre-Configured Workflows
This Setup does ALOT of checking and analyis before letting you push to main/master. Requiring a massive amount of Cross-Platform support.
## Why?
This automates everything from linting, to CI/CD. This allows us to just work on projects, as long as we follow the rules, without having to worry about deployement.
Fully automating out an entire departement in most companies called DevOps.
**You just need to pay attention to the following**
## How to use properly.
This is an EXAMPLE workspace, look around at the how the Cargo.Toml files are setup, they are important. Once you get comfortable, delete the existing stuff, and start making your own.
A few major points.
### Git Commits
This uses a tool to auto generate change logs and version indexing. As LONG as you feed it good data, one of such requirements are good commits
This project **REQUIRES** you to use the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) format. This allows for a whole HOST of good automated tooling. That you will love, in comparison to doing it all by hand. WHILE adding a bit of a requirement to making good split up commits.
Any commits **not** following this standard should be rejected or reworded. If a commit is *to large* or some other problem to not fit the mold. Then change the commit, do **NOT** break the rules.
### Gitea Registry
We don't publish to crates.io, instead we publish to the pre-configured gitea crates repo. Which keeps everything private. Does have the disadvantage of reqiuring a bit of extra work to use.
In the example_bin Cargo.toml file you can see
```toml
example_lib = { version = "0.1.1", path = "../example_lib", registry = "gitea" }
```
This line is VERY important, it uses a PATH based dependency to find the project. Which allows for it to be live.
Note that the version number will need to be updated, along WITH the fact that you need to make sure that it uses the "gitea" regsitry here as well. That is where cargo will expect to find it at later.
### Workspace
in the root level Cargo.toml is the workspace config
```toml
[workspace]
resolver = "3"
members = ["example_bin", "example_lib"]
```
notice how it LISTS all the crates that are members of the workspace? That is important!
### Cargo Lock files
All of the workflow tools remotely use --locked versions of cargo build and check, so therefore it **CANNOT** update the lock files.
The lock files are what versions of a package you are using when it was built. This is all about the philophsy of [reproducible builds](https://reproducible-builds.org/)
Rust Cargo Template with CI/CD Setup.