diff --git a/.github/actions/workspace-release/action.yml b/.github/actions/workspace-release/action.yml index 35615ea7d5..354ae3e29e 100644 --- a/.github/actions/workspace-release/action.yml +++ b/.github/actions/workspace-release/action.yml @@ -66,6 +66,21 @@ runs: echo "Cleaning target/package directory to ensure fresh state" rm -rf target/package + # Clear cargo registry to ensure fresh resolution during verification. + # This prevents issues where cached metadata from previous runs + # might interfere with workspace dependency feature resolution + # during the verification step (related to cargo#14283, cargo#14789). + # Specifically, this ensures the temp registry used during workspace + # publish verification doesn't conflict with cached crates.io data. + - name: Clear cargo registry for fresh resolution + if: ${{ inputs.mode == 'dry-run' }} + shell: bash + run: | + echo "Clearing cargo registry for fresh resolution" + rm -rf ~/.cargo/registry/cache + rm -rf ~/.cargo/registry/index + rm -rf ~/.cargo/registry/src + # Dry-run vs real publish - name: Dry-run workspace publish if: ${{ inputs.mode == 'dry-run' }}