on:
  workflow_call:

permissions: {}

env:
  CARGO_INCREMENTAL: 0
  CARGO_NET_RETRY: 10
  CARGO_TERM_COLOR: always
  RUSTUP_MAX_RETRIES: 10

jobs:
  cargo-publish-dry-run:
    timeout-minutes: 20
    runs-on: depot-ubuntu-24.04-8
    name: "cargo publish dry-run"
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
        with:
          persist-credentials: false
      - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
        with:
          save-if: ${{ github.ref == 'refs/heads/main' }}
      - name: "cargo publish dry-run"
        run: cargo publish --workspace --dry-run
