Skip to content

Commit 89a6f4a

Browse files
authored
Add a retry mechanism for publishing mmtk-core to crates.io (#618)
1 parent af2bfe7 commit 89a6f4a

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/cargo-publish.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,15 @@ jobs:
2222
- name: Publish sub crates
2323
run: |
2424
cargo publish --manifest-path=macros/Cargo.toml
25+
# Publish MMTk core.
26+
# As mmtk-core depends on the crate we just publish above, in practice there could be
27+
# a delay before we can find the exact version for the dependent crate on crates.io.
28+
# The script will retry publish for 5 times with 60 seconds between the retries.
2529
- name: Public mmtk-core
2630
run: |
27-
cargo publish
31+
for n in {1..5}; do
32+
echo "Attempt #"$n
33+
cargo publish && break
34+
echo "Wait for Retry #"$n
35+
sleep 60
36+
done

0 commit comments

Comments
 (0)