5 Commits
Author SHA1 Message Date
melfely 72575b2d24 docs: Added a fairly substantional readme file.
Release-plz / Release-plz PR (push) Canceled after 14s
Release-plz / Release-plz release (push) Canceled after 16s
This readme file documents how to use this repository as a template in a productive manner.
2026-09-11 11:20:33 -05:00
melfely 9e2ece840c Merge pull request 'chore(example_bin): release v0.1.1' (#5) from release-plz-2026-09-11T14-51-37Z into melfely/release-plz
Reviewed-on: #5

fix(bin): Added version for lib requirement

ci: added release-plz.toml file

fix: Add registry force in the dependencies of cargo section

ci: Changed release CI to only Run on the master/main branches
2026-09-11 11:20:33 -05:00
melfely 214e8f7f04 ci: Revert previous. Fixed "secret." to "secrets." for git credentials 2026-09-11 11:20:33 -05:00
ci-bot 3749f6b9ad chore(example_bin): release v0.1.1
Signed-off-by: ci-bot <bot@email.melfely.com>
2026-09-11 11:20:33 -05:00
melfely 61b4892417 Merge pull request 'chore(example_lib): release v0.1.1' (#4) from release-plz-2026-09-11T01-35-29Z into melfely/release-plz
Reviewed-on: #4

feat: bin example now references the local example_lib

ci: Changed from direct secret sub to env variables
2026-09-11 11:20:33 -05:00
6 changed files with 86 additions and 7 deletions
+2 -3
View File
@@ -52,8 +52,7 @@ jobs:
- name: Run release-plz release
run: |
release-plz release --forge gitea --git-token ${{ secrets.GITEA_TOKEN }} --registry gitea --token "Bearer ${{ secrets.CARGO_REGISTRIES_GITEA_TOKEN }}"
release-plz release --forge gitea --git-token ${{ secrets.GITEA_TOKEN }} --registry gitea --token "Bearer ${{ secrets.CARGO_REGISTRIES_GITEA_TOKEN }}"
# Create a PR with the new versions and changelog, preparing the next releases
release-plz-pr:
name: Release-plz PR
@@ -77,7 +76,7 @@ jobs:
- name: Fill Credentials
run: |
git config --global credential.helper store
echo "https://ci-bot:${{ secret.GITEA_TOKEN }}@gitea.melfely.com" > ~/.git-credentials
echo "https://ci-bot:${{ secrets.GITEA_TOKEN }}@gitea.melfely.com" > ~/.git-credentials
- name: Run release-plz release-pr
run: |
Generated
+4 -1
View File
@@ -4,7 +4,10 @@ version = 4
[[package]]
name = "example_bin"
version = "0.1.0"
version = "0.1.1"
dependencies = [
"example_lib",
]
[[package]]
name = "example_lib"
+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.
+14
View File
@@ -0,0 +1,14 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
## [0.1.1](https://gitea.melfely.com/melfely/rust_workflow_template/compare/example_bin-v0.1.0...example_bin-v0.1.1) - 2026-09-11
### Added
- bin example now references the local example_lib
+2 -1
View File
@@ -1,6 +1,7 @@
[package]
name = "example_bin"
version = "0.1.0"
version = "0.1.1"
edition = "2024"
[dependencies]
example_lib = { path = "../example_lib" }
+8
View File
@@ -1,3 +1,11 @@
use example_lib::*;
fn main() {
println!("Hello, world!");
let result = add(1, 1);
assert_eq!(result, 2);
let result = sub(1, 1);
assert_eq!(result, 0);
}