From 450cf28c6518fb058f229a5673d391aeb175fe16 Mon Sep 17 00:00:00 2001 From: Drake Bott Date: Wed, 24 Jun 2026 16:14:42 -0500 Subject: [PATCH] feat: Spindle workflows and yaml/md formatting --- .tangled/workflows/pr.yml | 20 ++++++++++++++++++++ .tangled/workflows/publish.yml | 17 +++++++++++++++++ flake.nix | 2 ++ 3 files changed, 39 insertions(+) create mode 100644 .tangled/workflows/pr.yml create mode 100644 .tangled/workflows/publish.yml diff --git a/.tangled/workflows/pr.yml b/.tangled/workflows/pr.yml new file mode 100644 index 0000000..d0a3c71 --- /dev/null +++ b/.tangled/workflows/pr.yml @@ -0,0 +1,20 @@ +when: + - event: ["pull_request"] + branch: ["main"] +engine: "nixery" +dependencies: + nixpkgs: + - cargo + - rustc + - clippy + - rustfmt + - gcc +steps: + - name: "Format check" + command: "cargo fmt --check" + - name: "Clippy" + command: "cargo clippy --all-targets -- -D warnings" + - name: "Tests" + command: "cargo test" + - name: "Release build" + command: "cargo build --release" diff --git a/.tangled/workflows/publish.yml b/.tangled/workflows/publish.yml new file mode 100644 index 0000000..97e2872 --- /dev/null +++ b/.tangled/workflows/publish.yml @@ -0,0 +1,17 @@ +# Publish to crates.io when a version tag is pushed (e.g. `v0.2.0`). +# +# Add CARGO_REGISTRY_TOKEN as a secret in the repo settings (Settings → Secrets). +when: + - event: ["push"] + tag: ["v*"] +engine: "nixery" +dependencies: + nixpkgs: + - cargo + - rustc + - gcc +steps: + - name: "Tests" + command: "cargo test" + - name: "Publish to crates.io" + command: "cargo publish" diff --git a/flake.nix b/flake.nix index 7d67b09..4454ee9 100644 --- a/flake.nix +++ b/flake.nix @@ -29,6 +29,8 @@ nixpkgs-fmt.enable = true; rustfmt.enable = true; taplo.enable = true; + yamlfmt.enable = true; + mdformat.enable = true; }; }; -- 2.51.2