Author SHA1 Message Date
melfely 93a7969315 ci: I guess fixes the syntax of the CI run. (#7)
Lint & Build / Linting (push) Successful in 1m57s
Lint & Build / Build (push) Successful in 1m13s
Lint & Build / Test (push) Successful in 2m41s
Lint & Build / Cross-Build-Windows (push) Successful in 3m18s
Lint & Build / Cross-Build-Linux (push) Successful in 4m1s
Lint & Build / Cross-Build-MacOS (push) Successful in 4m22s
Release-plz / Release-plz PR (push) Successful in 1m32s
Release-plz / Release-plz release (push) Failing after 1m39s
Not actually SURE even why it doesn't work now.

Reviewed-on: #7
2026-09-11 17:03:23 +00:00
melfelyandci-bot b8288087ab Merge in the Release-Plz Setup (#6)
Lint & Build / Linting (push) Successful in 1m23s
Lint & Build / Build (push) Successful in 1m1s
Lint & Build / Test (push) Successful in 1m35s
Lint & Build / Cross-Build-Windows (push) Successful in 2m6s
Lint & Build / Cross-Build-Linux (push) Successful in 2m12s
Lint & Build / Cross-Build-MacOS (push) Successful in 2m48s
This Pull Request will setup the process of Automatic release of everything in the workspace.

Adds in a README.md file.

---------

Co-authored-by: ci-bot <bot@email.melfely.com>
Reviewed-on: #6
Co-authored-by: Melfely <bug362@outlook.com>
2026-09-11 16:48:00 +00:00
6 changed files with 87 additions and 10 deletions
+3 -6
View File
@@ -2,9 +2,7 @@ name: Release-plz
on:
push:
# Comment out branch restrictions until we are closer to done
# branches:
# - [main, master]
branches: [main, master]
jobs:
@@ -52,8 +50,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 +74,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);
}