{"id":13578358,"url":"https://github.com/ameknite/rust-ci-cd-template","last_synced_at":"2026-04-02T20:53:33.848Z","repository":{"id":228009291,"uuid":"772923890","full_name":"ameknite/rust-ci-cd-template","owner":"ameknite","description":"Template to maintain a rust project running CI/CD with Github Workflows.","archived":false,"fork":false,"pushed_at":"2026-03-30T21:36:03.000Z","size":175,"stargazers_count":141,"open_issues_count":1,"forks_count":12,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-03-30T23:41:57.827Z","etag":null,"topics":["cicd","rust","template"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/rust-ci-cd-template","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ameknite.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE-Apache-2.0","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"ameknite","ko_fi":"ameknite"}},"created_at":"2024-03-16T08:51:26.000Z","updated_at":"2026-03-30T21:35:59.000Z","dependencies_parsed_at":"2024-08-05T23:27:09.769Z","dependency_job_id":"72773710-2696-476e-a6d1-a8d11e9ffb6f","html_url":"https://github.com/ameknite/rust-ci-cd-template","commit_stats":null,"previous_names":["ameknite/rust_cicd_template","ameknite/rust_ci_cd_template"],"tags_count":36,"template":true,"template_full_name":null,"purl":"pkg:github/ameknite/rust-ci-cd-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ameknite%2Frust-ci-cd-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ameknite%2Frust-ci-cd-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ameknite%2Frust-ci-cd-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ameknite%2Frust-ci-cd-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ameknite","download_url":"https://codeload.github.com/ameknite/rust-ci-cd-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ameknite%2Frust-ci-cd-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31316008,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cicd","rust","template"],"created_at":"2024-08-01T15:01:29.760Z","updated_at":"2026-04-02T20:53:33.820Z","avatar_url":"https://github.com/ameknite.png","language":"Rust","funding_links":["https://github.com/sponsors/ameknite","https://ko-fi.com/ameknite"],"categories":["Rust"],"sub_categories":[],"readme":"# Rust CI/CD template\n\n[![License](https://img.shields.io/badge/license-CC0--1.0%2FMIT%2FApache--2.0-blue.svg)](https://github.com/ameknite/rust-ci-cd-template?tab=readme-ov-file#license)\n[![Crates.io](https://img.shields.io/crates/v/rust-ci-cd-template.svg)](https://crates.io/crates/rust-ci-cd-template)\n[![Minimum Supported Rust Version](https://img.shields.io/badge/MSRV-1.81.0+-red.svg)](./Cargo.toml#L8)\n[![CI](https://github.com/ameknite/rust-ci-cd-template/actions/workflows/ci.yaml/badge.svg)](https://github.com/ameknite/rust-ci-cd-template/actions?workflow=CI)\n\nTemplate to maintain a rust project running CI/CD with Github Workflows.\n\n\u003c!-- todo!(Change this file) --\u003e\n\n## CI Workflow\n\n[ci.yaml](./.github/workflows/ci.yaml)\n\n![CI](https://github.com/ameknite/rust-ci-cd-template/assets/104745335/b190e0c7-53dc-4d8a-bc86-88ced3bf559c)\n\nThis workflow will run every time you push to main or make a pull request.\nYou can also run the workflow manually in github.\n\nIt will run:\n\n- cargo build: Compiling for ubuntu-latest.\n- cargo [fmt](https://github.com/rust-lang/rustfmt):\n  - Rust Formatter.\n  - Check for the file [rustfmt.toml](./rustfmt.toml).\n- cargo [clippy](https://github.com/rust-lang/rust-clippy):\n  - Lints catch common mistakes and improve your Rust code.\n  - Check for the sections `[lints.rust]` and `[linsts.clippy]`\n    in the [Cargo.toml file](./Cargo.toml).\n- cargo doc: Build the documentation.\n- cargo doc --test: Run tests in the documentation, only if the crate is a lib.\n- [cargo-nextest](https://nexte.st/): Execute unit and integration tests.\n- [cargo miri](https://github.com/rust-lang/miri) test: Help to detect certain classes of [undefined behavior](https://doc.rust-lang.org/reference/behavior-considered-undefined.html).\n- [typos](https://crates.io/crates/typos):\n  - Source code spell checker.\n  - Check for the [typos.toml](./typos.toml) file.\n  - [docs](https://github.com/crate-ci/typos/blob/master/docs/reference.md)\n- [taplo fmt](https://taplo.tamasfe.dev/): Toml formatter.\n- [markdownlint-cli2](https://github.com/DavidAnson/markdownlint-cli2):\n  - Markdown linter and formatter.\n  - Check for the file [.markdownlint.yaml](./.markdownlint.yaml)\n- [yamlfmt](https://github.com/google/yamlfmt/): Yaml formatter.\n- [cargo deny](https://github.com/EmbarkStudios/cargo-deny):\n  - Check for licenses, bans, advisories and sources.\n  - Check for the [deny.toml](./deny.toml) file.\n  - [template](https://github.com/EmbarkStudios/cargo-deny/blob/main/deny.template.toml)\n  - [docs](https://embarkstudios.github.io/cargo-deny/)\n- [cargo audit](https://crates.io/crates/cargo-audit):\n  - Check for security vulnerabilities.\n  - Uses the [advisory-db](https://github.com/RustSec/advisory-db/)\n- [cargo msrv](https://github.com/foresterre/cargo-msrv):\n  Keep the rustc version on check.\n\n## CD Workflow\n\n![CD-1](https://github.com/ameknite/rust-ci-cd-template/assets/104745335/908c7e28-fa79-4669-95a1-a293a2de404a)\n![CD-2](https://github.com/ameknite/rust-ci-cd-template/assets/104745335/35c1f888-03ee-4090-989e-bde9dc838e76)\n\n[build_and_release.yaml](./.github/workflows/build_and_release.yaml)\n\nThis workflow will only run manually through GitHub.\n\nIt will:\n\n- Validate your input version with regex (e.g. v3.1.4-alpha+159).\n- Run the ci workflow.\n- Run [cargo semver-checks](https://crates.io/crates/cargo-semver-checks):\n  - Lint your crate API changes for semver violations.\n  - This will only run if you crate is a library.\n  - Uses your previous tag as a baseline.\n- Run [add-notice](https://crates.io/crates/add-notice):\n  - Add header notices to your rust files.\n  - Check for the [NOTICEe file](./NOTICE).\n  - Auto-commit.\n- Run [cargo-bump](https://crates.io/crates/cargo-bump):\n  - Bump the current version of the Cargo.toml file.\n  - Uses the input version if provided.\n  - Auto-commit.\n- Run [cargo-attributions](https://crates.io/crates/cargo-attribution):\n  - Comply with licenses distribution.\n  - Add licenses, notices and metadata of your dependencies.\n  - Crate an [attribution folder](./attribution/)\n  - Auto-commit.\n- Create a new tag:\n  - Uses the input version if provided.\n  - It's created only if the tag not exists.\n- Create a new github release:\n  - Uses [create-gh-release-action](https://github.com/taiki-e/create-gh-release-action/tree/v1/)\n  - Includes your changelog if matches the same version.\n  - Uses the created tag as a reference.\n- Build and Release in Github:\n  - Using [upload-rust-binary-action](https://www.github.com/taiki-e/upload-rust-binary-action/tree/v1/)\n  - And [setup-cross-toolchain-action](https://github.com/taiki-e/setup-cross-toolchain-action/tree/v1/)\n  - Only builds if your crate contains a binary crate.\n  - Uses the created tag as a reference.\n  - Bundle the attribution folder with licenses and notices.\n  - Create checksum with sha256.\n  - It builds for linux: gnu (x86_64|aarch64|riscv64gc) and musl (x86_64|aarch64).\n  - It builds for windows: msvc (x86_64|aarch64) and gnu (x86_64).\n  - It builds for mac-os (x86_64|aarch64).\n- Publish the create to crates.io:\n  - Only if you have the secrets.CARGO_REGISTRY_TOKEN variable added to repository secrets.\n  - Path: Settings -\u003e Security -\u003e Secrets and variables -\u003e Actions -\u003e Repository secrets.\n\n### How to use the Build and Release workflow\n\nYou will run this directly in your Github repo -\u003e Section `Actions` -\u003e `[Main] Build \u0026 Release` workflow. -\u003e `Run workflow` button.\n\n![Build and Release Workflow](https://github.com/ameknite/rust-ci-cd-template/assets/104745335/2c6235cb-def6-4cb6-ada8-d3d32523d097)\n\nHere you can do three things to run the workflow:\n\n  1. Write the new version you want to release:\n    - The version is in the form of:\n      - Version parts: `${MAJOR}.${MINOR}.${PATCH}-${PRE-RELEASE}+${BUILD}`\n      - Example: 3.1.4-alpha+159\n  2. Select the release_type you want:\n      ![release-type](https://github.com/ameknite/rust-ci-cd-template/assets/104745335/5a503614-2418-44fa-ac84-f0eb051196dc)\n      - `patch`, `minor` and `major`.\n      - It will use your current crate version as a baseline.\n      - Keep in `none` if you only want the writing version.\n  3. Keep all with the defaults (without version and release_type = none)\n      - It will use your current crate version as a baseline.\n      - Run if you already update your crate version.\n      - Useful for testing when you already run the workflow.\n\nThe two booleans allow you to publish your crate to creates.io and overwrite your tag to add modifications to a release, respectively.\n  \n## Dependabot\n\nThis template includes a setup for dependabot and a workflow for auto-merge.\n\n- It will update packages for cargo and github-actions weekly.\n\n- For rust:\n  - It will create pull request in groups.\n  - One group for patch updates, one for minor updates and one for major updates.\n  - It will auto-merge the pull request if passes ci.\n  \n- For github-actions:\n  - It will create a pull request in groups.\n  - Only one group for the updates.\n  - It will auto-merge the pull request if passes ci.\n\n## Other workflows\n\nThis template uses [workflow call](https://docs.github.com/en/actions/using-workflows/reusing-workflows) and [workflow dispatch](https://docs.github.com/en/actions/using-workflows/manually-running-a-workflow) to reuse workflows and be able to run them individually. So you can run various jobs of the ci/cd workflows independently.\n\nSome workflows to consider:\n\n- [weekly-workflow](./.github/workflows/weekly.yaml)\n  - Run the ci workflow.\n  - Update Dependencies, Attributions and Notices.\n- [monthly-workflow](./.github/workflows/monthly.yaml)\n  - Run the build_and_release workflow.\n  - Do a patch release and publish to crates.io\n- [update_msrv.yaml](./.github/workflows/update_msrv.yaml)\n  - It will run cargo-msrv to update your `rust-version` in Cargo.toml\n  - If you uses the MSRV in your README.md it will also updated it.\n- [cargo_semver_checks](./.github/workflows/cargo_semver_checks.yaml)\n  - Test semver violations before releasing.\n- [cache.yaml](./.github/workflows/cache.yaml)\n  - To clean the caches generated for the workflows.\n  - Run if you have problems with the cache.\n- [add_notice.yaml](./.github/workflows/add_notice.yaml)\n  - To replace and update your notices.\n  - To apply notices to other kind of files.\n  - To use different comment styles.\n- [publish.yaml](./.github/workflows/publish.yaml)\n  - To publish your crate to crates.io.\n\n## What to change if you want  to use this template\n\n- Change [this file](.).\n- Change the metadata in [Cargo.toml](./Cargo.toml)\n- Change the licenses files. Right now uses [LICENSE-CC0-1.0](./LICENSE-CC0-1.0), [LICENSE-MIT](./LICENSE-MIT)\nand [LICENSE-Apache-2.0](./LICENSE-Apache-2.0).\n- Change the [deny.toml](./deny.toml) file.\n- Change the [NOTICE](./NOTICE) file:\n  - Remove the notice in [main.rs](./deny.toml).\n  - Or you can run add-notice --remove before you update the NOTICE file.\n- Change the [FUNDING.yaml](./.github/FUNDING.yaml) file.\n\n## Similar projects that might help you\n\n- [cargo-dist](https://github.com/axodotdev/cargo-dist?tab=readme-ov-file).\n- [cargo-release](https://github.com/crate-ci/cargo-release).\n- [release-plz](https://github.com/MarcoIeni/release-plz).\n- [cargo-smart-release](https://github.com/Byron/cargo-smart-release).\n\n## LICENSE\n\nSPDX-License-Identifier: CC0-1.0 OR MIT OR Apache-2.0\n\nLicensed under a triple license at your option:\n\n- [CC0-1.0](LICENSE-CC0-1.0) license.\n- [MIT](LICENSE-MIT) license.\n- [Apache-2.0](LICENSE-Apache-2.0) license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fameknite%2Frust-ci-cd-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fameknite%2Frust-ci-cd-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fameknite%2Frust-ci-cd-template/lists"}