Skip to content

Migration to v1.1.0

These are the steps to migrate from v1.0.1 to v1.1.0.

Update CI Documentation Check

Update .github/workflows/rust.yml to use --no-deps for faster documentation builds:

      - name: Check documentation is valid
        if: github.event_name == 'pull_request' || startsWith(github.ref, 'refs/tags/')
        working-directory: src
        env:
          RUSTDOCFLAGS: "-D warnings"
-       run: cargo doc --workspace --all-features --document-private-items --target ${{ matrix.target }}
+       run: cargo doc --no-deps --workspace --all-features --document-private-items --target ${{ matrix.target }}

Add Verification Scripts

Create .cargo/verify.sh for Linux/macOS:

#!/usr/bin/env bash
# Post-change verification script
# All steps must pass without warnings
# Keep in sync with verify.ps1

set -e

run_cmd() {
  echo "$*"
  "$@"
}

echo "Building..."
run_cmd cargo build --workspace --all-features --all-targets --quiet

echo "Testing..."
run_cmd cargo test --workspace --all-features --quiet

echo "Clippy..."
run_cmd cargo clippy --workspace --all-features --quiet -- -D warnings

echo "Docs..."
run_cmd env RUSTDOCFLAGS="-D warnings" cargo doc --workspace --all-features --no-deps --document-private-items --quiet

echo "Formatting..."
run_cmd cargo fmt --all --quiet

echo "All checks passed!"

Create .cargo/verify.ps1 for Windows:

# Post-change verification script
# All steps must pass without warnings
# Keep in sync with verify.sh

$ErrorActionPreference = "Stop"

function Invoke-LoggedCommand {
    param(
        [string]$Command,
        [string[]]$Arguments
    )

    if ($Arguments.Count -gt 0) {
        Write-Host ($Command + " " + ($Arguments -join " "))
    } else {
        Write-Host $Command
    }

    & $Command @Arguments
}

Write-Host "Building..."
Invoke-LoggedCommand "cargo" @("build", "--workspace", "--all-features", "--all-targets", "--quiet")

Write-Host "Testing..."
Invoke-LoggedCommand "cargo" @("test", "--workspace", "--all-features", "--quiet")

Write-Host "Clippy..."
Invoke-LoggedCommand "cargo" @("clippy", "--workspace", "--all-features", "--quiet", "--", "-D", "warnings")

Write-Host "Docs..."
$env:RUSTDOCFLAGS = "-D warnings"
Invoke-LoggedCommand "cargo" @("doc", "--workspace", "--all-features", "--no-deps", "--document-private-items", "--quiet")

Write-Host "Formatting..."
Invoke-LoggedCommand "cargo" @("fmt", "--all", "--quiet")

Write-Host "All checks passed!"

Update AGENTS.md

Replace the inline verification commands in src/AGENTS.md:

- # Post-Change Verification
+ # Verification

- All must pass without warnings:
-
- ```bash
- cargo build --workspace --all-features --all-targets --quiet
- cargo test --workspace --all-features --quiet
- cargo clippy --workspace --all-features --quiet -- -D warnings
- cargo doc --workspace --all-features --quiet
- cargo fmt --all --quiet
- cargo publish --dry-run --quiet
- ```
+ After code changes or for checks (testing/linting/building/docs/formatting), run `.cargo/verify.sh` (`.cargo/verify.ps1` on Windows). It echoes each command and runs the full suite, including core tests and any extra checks. Do this before returning to the user.

Add Path Filters to CI Workflow

Update .github/workflows/rust.yml to only run CI when source code changes:

 on:
   push:
     branches: [main]
     tags:
       - "*"
+    paths:
+      - "src/**"
   pull_request:
     branches: [main]
+    paths:
+      - "src/**"
   workflow_dispatch:

This prevents unnecessary CI runs for documentation, configuration, or other non-code changes. Tag pushes and manual dispatch remain unaffected.

Disable Duplicate Caching (CLI Projects Only)

If your project includes a CLI, add use-cache: false to the CLI build step:

       - name: Build CLI Binary
         uses: Reloaded-Project/devops-rust-lightweight-binary@v1
         with:
           target: {% raw %}${{ matrix.target }}{% endraw %}
           use-pgo: {% raw %}${{ matrix.use-pgo && env.build-with-pgo }}{% endraw %}
           use-cross: {% raw %}${{ matrix.use-cross }}{% endraw %}
           build-library: false
           run-tests-and-coverage: false
           rust-project-path: src/cli
           workspace-path: src
           pgo-project-path: src/{{project-name}}
+          use-cache: false

This prevents redundant caching since the previous test/coverage step already cached the workspace.

Enable Auto-Delete Merged Branches

Enable automatic deletion of merged branches for your repository:

gh repo edit --delete-branch-on-merge

Or via UI: Settings > General > check "Automatically delete head branches"

Add Template-Level AGENTS.md

Add AGENTS.md to the template root for users who open the repository root instead of src/ in their IDE:

@src/AGENTS.md

Useful for AI-assisted changes that touch CI and other non-src files.

Update Template Version Marker

Update .github/template-version.txt to reflect the new version:

- reloaded-templates-rust:1.0.1
+ reloaded-templates-rust:1.1.0