image: docker.nix-community.org/nixpkgs/nix-flakes:nixos-23.11 definitions: steps: - step: &build-and-checks name: Build and Checks script: - ./.ci/bin/runner ./.ci/bin/build-and-check caches: - cargo-home - cargo-target-workaround - nix-store - step: &publish name: Publish to Crates.io script: - ./.ci/bin/runner ./.ci/bin/publish # Note that other caches won't be needed as using artifacts from # `build-and-checks`. caches: - cargo-home caches: cargo-home: key: files: - Cargo.lock - Cargo.toml path: $HOME/.cargo cargo-target-workaround: .ci/.cache/cargo-target nix-store: .ci/.cache/nix-store pipelines: tags: '*': - step: <<: *build-and-checks artifacts: - .ci/.cache/** - step: <<: *publish trigger: manual branches: master: - step: *build-and-checks pull-requests: '**': - step: *build-and-checks