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; }; };