diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 44025ad..a629bc0 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -73,8 +73,19 @@ jobs: - name: Verify cargo publish includes all files needed to build run: | - cargo package --list -p chrono-tz - cargo publish --dry-run -p chrono-tz + cargo vendor + cargo package -p chrono-tz-build + cargo package -p chrono-tz --no-verify + for crate in target/package/*.crate + do + name=$(basename "$crate" .crate) + tar xvfz "$crate" -C vendor/ + # Crates in the vendor directory require a checksum file, but it + # doesn't matter if it is empty. + echo '{"files":{}}' > vendor/$name/.cargo-checksum.json + done + cargo package --config "source.vendored-sources.directory = 'vendor'" \ + --config "source.crates-io.replace-with = 'vendored-sources'" lint: runs-on: ubuntu-latest