From 056e47b8a7525e38613d57e4e4a6fb9b2c60cf99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Louf?= Date: Mon, 9 Dec 2024 20:48:15 +0100 Subject: [PATCH] Allow uncommitted VCS changes to be packaged in CI We dynamically change the version in Cargo.toml based on the current tag, so the Cargo.toml file is not staged when we use `cargo publish`. Since this will be the only file that is not tracked by `git` it is safe to use the `--allow-dirty` option. --- .github/workflows/release_rust.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release_rust.yaml b/.github/workflows/release_rust.yaml index ad4863a..db6d43b 100644 --- a/.github/workflows/release_rust.yaml +++ b/.github/workflows/release_rust.yaml @@ -43,4 +43,5 @@ jobs: - name: Publish to crates.io env: CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} - run: cargo publish + # We need --allow-dirty since we dynamically change the version in Cargo.toml + run: cargo publish --allow-dirty